Displaying 20 results from an estimated 4000 matches similar to: "Usage questions"
2000 Jun 16
1
postscript device on R-1.1.0
Am I the only one with this problem?
> postscript()
Error in old$command == "default" : comparison (1) is possible only for
vector types
The function postscript() is creates a list called "old". the function
wants to access old$command, but old does not have a component called
command.
> postscript
function (file = ifelse(onefile, "Rplots.ps",
2011 Nov 05
1
How to infer default width and height for a device?
Hi.
GENERAL:
Is there a general method for inferring default device settings,
particularly 'width' and 'height', that works for all devices? AFAIK,
the answer is no, but there might be functions out there that I don't
know of.
POSTSCRIPT SPECIFIC:
If not, I'm considering implementing such a method myself. Is it
possible for R to infer the default 'width' and
2008 May 26
2
R 2.7.0: pdf() > pdf.options versus formals
Hi,
I have a tiny question about the graphics change in R 2.7.0.
If I write a script ? la:
options(device="pdf")
formals(pdf)[c("file","onefile","width","height")] <- list("~/Rplot
%03d.pdf", FALSE, 8, 8)
plot(3)
plot(4)
both plots will be written into ONE pdf file. (not two as expected)
This worked fine under 2.6.x
In R 2.7.0 I
2009 Aug 11
1
Generating R plots via Ruby CGI
Greetings,
I'm trying to debug a simple two-line plot routine in R called test.R:
cor(swiss)
plot(swiss$Catholic, swiss$Examination)
These commands work fine when typed into R. They also work fine when
I invoke this routine by the following line into my terminal:
R --slave < /Library/WebServer/Documents/gsa/test.R
My ultimate goal is to send data to this R routine via a web
2005 Jul 23
1
"%03d" in the pdf command
The pdf man page contains the following text:
pdf(file = ifelse(onefile, "Rplots.pdf", "Rplot%03d.pdf"),
width = 6, height = 6, onefile = TRUE, family = "Helvetica",
title = "R Graphics Output", fonts = NULL, version = "1.1",
paper, encoding, bg, fg, pointsize)
I am creating multi-page graphics in which each
2009 Aug 10
4
Saving plots to file
Appologies if this has been addressed before, but I can't seem to find it in
the help archives.
I'm looking to do something like the following but it looks like save.plot
is deprecated.
save.plot(plot(glm1$residuals,gain,main = "Hist of residuals and
gain"),file="Desktop/hist1.png")
Thanks in advance,
Sean
Session Info:
R version 2.9.1 (2009-06-26)
2003 Apr 22
4
Default value for title in postscript function
I like the fact that the postscript function enables the possbiility
of a more useful title than before. However, I'd prefer the default
to be the file name.
It's very simple for me to make my own postscript function that does
just that simply by setting title = file. I always use onefile =
TRUE, so it always works (so far). However, I'm a little reluctant to
do that in case some
2003 Apr 22
4
Default value for title in postscript function
I like the fact that the postscript function enables the possbiility
of a more useful title than before. However, I'd prefer the default
to be the file name.
It's very simple for me to make my own postscript function that does
just that simply by setting title = file. I always use onefile =
TRUE, so it always works (so far). However, I'm a little reluctant to
do that in case some
2012 Nov 01
3
Duda gráfico DIN A-4
Hola,
¿Alguien me puede indicar cómo conseguir que un gráfico se adapte al formato DIN-A4, con su correspondiente verticalidad?. ¿Hay que hacerlo "manualmente" o existe algún parámetro/función que lo controle?.
Gracias.
Eva
[[alternative HTML version deleted]]
2009 Jan 19
1
patch for textspecial and defaultfont in xfig
Hello,
The current xfig device lacks the functionality to set the
textspecial flag and use the defaultfont in xfig. This is necessary
when you want to export to xfig and use interpreted text (e.g., $
\frac{1}{e}$ gets interpreted by latex). The attached patch adds this
functionality.
Why would you like to do this?
- Use math in labels (e.g., name your variables $r_{xy}$, do a
2000 Aug 17
1
Things I don't understand about the graphics interface
Using R-1.1.1 on RedHatLinux 6.2.
I've made some progress, succeeded in outputting bitmap, jpeg, and png
files. Yipee.
I did them with this command:
> dev2bitmap("whatever.bmp",res=300)
> dev.print(png, file="myplot.png", width=480, height=480)
> dev.print(jpeg, file="myplot.jpg", width=480, height=480)
> dev.print(pictex,
2012 Sep 23
1
Background color in a grid plot seems to interfere with plot()
Hi,
Why does the upper left panel (in the plot below) not have a gray background?
Cheers,
Marius
require(grid)
require(gridBase)
pdf(file="Rplot.pdf", width=8, height=8, onefile=FALSE)
## set up the grid layout
gl <- grid.layout(5, 5, widths=unit(c(1.8, 8, 0.8, 8, 0.8), "cm"),
heights=unit(c(0.8, 8, 0.8, 8, 1.5), "cm"))
if(FALSE) grid.show.layout(gl)
2011 Sep 13
1
CMYK color space
dear R experts---I am struggling with the requirements to prepare my files
for my printers. I am printing in 2/2 format, which means cyan and black
for me, which they take from my color-separated pdf files. R comes into
play, because it produces all the figures that are embedded in my book
(pdflatex).
now, TeX has no problems producing CMYK files. However, R produces RGB
files (for
2002 Nov 15
1
postscript()
Hi,
I've been trying out postscript() when onefile is set to FALSE. However
I'm having trouble understanding the documentation for postscript().
Suppose I want to do:
plot(1:10)
plot(1:10, type = "l")
and store them in foo.ps and goo.ps. Furthermore, I'd like to do then
with one postscript() command -- because this is just a simplified version
of what I really need
2005 Sep 21
2
controlling usage of digits & scientific notation in R plots; postscript margins
Dear R users:
I assigned students to make some graphs and I'm having trouble answering
some questions that they have. We are all working on R 2.1 on Fedora
Core Linux 4 systems.
1. In the plot, the axis is not labeled by "numbers", but rather
scientific notation like "-2e+08" or such. We realize that means
-200,000,000. We want to beautify the plot. We would rather
2011 Jun 01
1
weird error from MASS::eqcsplot with postscript driver
[Env: R 2.12.2, Win XP]
I'm creating figures using MASS::eqcsplot to provide equal scaling of
the axes. My figures work OK
when I plot to the screen, but when I try to do the same plot as a
postscript file, I get an
unexplicable error,
> figframe()
Error in if (yuin > xuin * ratio) yuin <- xuin * ratio else xuin <-
yuin/ratio :
missing value where TRUE/FALSE needed
>
2002 Feb 17
3
Little graph questions!
I'm working up a set of small working examples in R to show what various
distributions are and the beauty of the central limit theorem. Those
example programs are in this directory:
http://lark.cc.ukans.edu/~pauljohn/R/ExampleCode/
You can feel free to use those if you want, or you can send me other
small working example code for R. The key here is small, self contained
things that
2003 Sep 26
1
empty postscript output of figures
Hi,
I have a puzzeling problem. I want to export graphics from R to TeX via
postscript(). This works fine for some graphs, but for others, the eps
remain empty when viewed with GSView. When such an empty eps is imported
to TeX, the figure appears upside down and very small, irrespective of
TeX width and height commands. If I transform the eps to pdf, the
graphic shows up, but turned aqround 90°.
2011 Oct 27
1
minimizing device-dependent code in graphics scripts
Here is a common scenario that I and probably others often face:
- I write a script, test.R, to produce some graphs, viewing them
on-screen and tinkering until they look right
- I want to save image files (e.g., .png), so I wrap each plot in device
driver calls, e.g.,
png(file='test01.png', width=600, height=600);
plot(1:10)
dev.off()
png(file='test02.png', width=600,
2006 May 15
1
adding line to spinogram
Dear all,
I wonder what's special about spinograms {vcd} that prevents me from using
it the way I do with other plots.
I do:
> spine(f.speaker.identity ~ x.log.lengthening,
> data=ms,breaks=45,gp=gpar(fill=c("red","green")),xlab="length difference
> (log ms)",ylab="speaker")
> curve(0*x,add=T)
Error in plot.xy(xy.coords(x, y), type =