Hi all,
I have the following script,which won't plot (tried in RGUI and also
in Eclipse StatET):
library(ggplot2) # for plotting results
userids <- c(1,2,3)
for (userid in userids){
qplot(c(1:10), c(1:20))
}
print ("end")
No plot shows up. If I run the following:
library(ggplot2) # for plotting results
userids <- c(1,2,3)
for (userid in userids){
blabla)))
qplot(c(1:10), c(1:20))
}
print ("end")
which contains a syntax mistake in line 4, then I get the plot output
on the screen. I have the same issue when using lattice, but its ok
when using standard graphics plot.
WHAT IS GOING ON???
Ralf
David Winsemius
2010-May-14 23:32 UTC
[R] Strange behavior when plotting with ggplot2 and lattice
On May 14, 2010, at 7:21 PM, Ralf B wrote:> Hi all, > > I have the following script,which won't plot (tried in RGUI and also > in Eclipse StatET): > > library(ggplot2) # for plotting results > userids <- c(1,2,3) > for (userid in userids){ > qplot(c(1:10), c(1:20)) > } > print ("end") > > No plot shows up.Read the FAQ."Why do lattice/trellis graphics not work?"> If I run the following: > > library(ggplot2) # for plotting results > userids <- c(1,2,3) > for (userid in userids){ > blabla))) > qplot(c(1:10), c(1:20)) > } > print ("end") > > which contains a syntax mistake in line 4, then I get the plot output > on the screen. I have the same issue when using lattice, but its ok > when using standard graphics plot.Yep. Standard graphics plot by side-effect.> > WHAT IS GOING ON??? > > Ralf > > ______________________________________________ > 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.David Winsemius, MD West Hartford, CT