Re: [R] function in order to plot the same graph to postscript and pdf

From: Achim Zeileis <Achim.Zeileis_at_wu-wien.ac.at>
Date: Thu 10 Mar 2005 - 01:41:25 EST

On Wed, 9 Mar 2005 15:24:48 +0100 Ronny Klein wrote:

> > What are the myplot objects? Expressions or graphical objects that
> > are printed?
>
> The myplot is something like this:
>
> plot(x)
> text(foo)

Aha, I was surprised that this worked for one of the two plots. You could pass myplot as an expression, e.g. myplot = expression(plot(x)), and then eval() that in the body of plot.both().

But personally, I wouldn't do that :-) and use Sweave instead. Z

> etc.
>
> > In any case, a good recommendation for this kind of stuff is to look
> > at Sweave() in the utils package. I guess you're writing your thesis
> > in LaTeX...and Sweave is a great possibility to mix LaTeX code and R
> > code which for example generates both pdf and eps graphics.
>
> Thanks, I will have a look on it.
>
> Ronny
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Mar 10 01:56:54 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:42 EST