[R] dotplot & lattice problems: y axis values and bg color output in jpg
pauljohn at ku.edu
Sat Oct 23 00:16:37 CEST 2004
I have a linux system with Fedora Core 2 and R-2.0.
I was comparing plots made with plot() and dotplot() and discovered a
problem. Although the dots are positioned correctly, the numerical
labels in the dotplot y axis are not correct.
I put copies here:
That is the "correct" one from plot, with the higest value on y showing
That is the dotplot one. The picture is basically the same, except the
numbers on the y axis only go up to 8. But the dots are in the correct
spots and the x axis is labeled correctly.
On the screen, the plots have white backgrounds, but the picture from
the dotplot turns out gray. Why is that? Sometimes, if I run another
lattice plot in the same session, the colors change to the dark
background, and I suppose the same trouble is happening. Isn't
trellis.par.set() going to remain in place for all following trellis plots?
Here's the code I used to make these 2 graphs.
modall <- lm(RENUCYC~OLDCRASH,data=data2003)
dotplot (RENUCYC~OLDCRASH, data=elaine1, xlab="ECR",
I tried to force the ylim on the dotplot up to 18, but it just produced
this even uglier result.
Paul E. Johnson email: pauljohn at ku.edu
Dept. of Political Science http://lark.cc.ku.edu/~pauljohn
1541 Lilac Lane, Rm 504
University of Kansas Office: (785) 864-9086
Lawrence, Kansas 66044-3177 FAX: (785) 864-5700
More information about the R-help