[R] XYplot in Lattice Package
jimdare
jamesdare26 at gmail.com
Fri Jan 16 03:27:05 CET 2009
Dear R-Users
I have 2 questions to do with XYplot.
1)
I am trying to use the XYplot function to generate multiple line graphs with
the legend outside the plot.
I am using the following loop for each graph:
library(lattice)
for (i in x.sp){
xyplot(Catch~Year, df, groups = Stock, type="a",auto.key =
list(space = "top", points = FALSE, lines = TRUE,columns = 4))
}
When I run the script I don't get any output graphs, however if I change
'XYplot' to 'plot', or generate the plots manually using XYplot, It seems to
work. Is there a bug of some sort or is it me?
2)
How do I remove the "top" and "right" axis from a plot? If I add 'axis(side
= c("bottom", "left")' to the xyplot call it comes up with the message:
Error in axis(side = c("bottom", "left")) :
plot.new has not been called yet
Any help is much appreciated :)
--
View this message in context: http://www.nabble.com/XYplot-in-Lattice-Package-tp21491296p21491296.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list