[R] About "Plot.new"
cathelf
cathelf at hotmail.com
Fri Sep 12 00:41:17 CEST 2008
Hi, sorry for bothering your guys.
I will trying to make some nice graph using boxplot. when I check the help
file of boxplot, there is a sample code as:
boxplot(len ~ dose, data = ToothGrowth, add = TRUE,
boxwex = 0.25, at = 1:3 + 0.2,
subset = supp == "OJ", col = "orange")
legend(2, 9, c("Ascorbic acid", "Orange juice"),
fill = c("yellow", "orange"))
But when I run it, it shows the following error:
Error in xypolygon(xx, yy, lty = "blank", col = boxfill[i]) :
plot.new has not been called yet
what does it mean? If I first run "plot.new()", then running the above
code, only the x-axis and y-axis is on the graph, no boxplot inside.
Can anyone tell me how to call plot.new or at least how to run the above
code correctly?
Thank you very much!
--
View this message in context: http://www.nabble.com/About-%22Plot.new%22-tp19446258p19446258.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list