[R] xyplot question

Leeds, Mark (IED) Mark.Leeds at morganstanley.com
Tue Sep 11 19:06:00 CEST 2007


Thanks Deepyan. I am doing it in source but I didn't realize that that
was a function. Thanks so much.


-----Original Message-----
From: Deepayan Sarkar [mailto:deepayan.sarkar at gmail.com] 
Sent: Tuesday, September 11, 2007 12:38 PM
To: Leeds, Mark (IED)
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] xyplot question

On 9/11/07, Leeds, Mark (IED) <Mark.Leeds at morganstanley.com> wrote:
> I have the code below and it works fine if I print the xyplot but if I

> take the print out, then I just get a blank pdf. The same holds if I 
> just send the plot to the console without the print ( I get nothing ).

> My question is whether this is always the case with xyplot or is there

> something wrong with my settings ? I am on linux ( redhat ) and using 
> R.2.5.0. Thanks.

I don't have your stock.dat, but running the following in a fresh R
session does give me a PDF file with the expected plot.

$ R-devel --vanilla

R version 2.6.0 Under development (unstable) (2007-08-06 r42439) [...]

> library(lattice)
> pdf('temp.pdf', width=10, height=8)
> xyplot(1:10 ~ 1:10)
> dev.off()

Are you sure you are not doing this inside a function (maybe source)?

-Deepayan


>
>
> load("stocks.dat")
>
> pdf('temp.pdf', width=10, height=8)
>
> trellis.par.set(superpose.symbol=list(pch=19, cex=0.8)) # filled 
> circles
>
> print(xyplot(value ~ date|group, groups=wt, data=stocks.all, type='o',

> layout=c(2,2),
>     auto.key=list(columns=6), scales=list(x=list(rot=90))))
>
> dev.off()
>
> #=====================================================================
> == ============================================
>
>
> sessionInfo()
> R version 2.5.0 (2007-04-23)
> i686-pc-linux-gnu
>
> locale:
> C
>
> attached base packages:
> [1] "datasets"  "utils"     "stats"     "graphics"  "grDevices"
> "methods"   "base"
>
> other attached packages:
>  lattice filehash  reshape      zoo    chron     MASS
> "0.15-8"    "1.0"  "0.7.4"  "1.3-1" "2.3-11" "7.2-33"
> --------------------------------------------------------
>
> This is not an offer (or solicitation of an offer) to 
> buy/se...{{dropped}}
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--------------------------------------------------------

This is not an offer (or solicitation of an offer) to buy/se...{{dropped}}



More information about the R-help mailing list