I am trying to plot some data, but have got some difficulties with labels on
the tick marks on the x-axes. There are 20 data points. All I want to do is
to plot the Loss versus Lines. When I use xyplot, the first tick mark starts
from 2 rather than 1, and also there is a NA as the final tick mark.

Here is the R code you code give it a try:

Would any body be able to fix this, please?

#################################################################################################################

plotDATA=data.frame(Loss=c(1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10),Level=c("AvgAll","AvgAll","AvgAll","AvgAll","AvgAll","AvgAll","AvgAll",

"AvgAll","AvgAll","AvgAll","AvgAll","AvgAll","GUL","GUL","GUL","GUL","GUL","GUL","GUL","GUL"),Line=c(1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8))

library(lattice)

xyplot( Loss ~ Line, data=plotDATA, t="p",

scales=list(relation="free", x=list(draw=TRUE, tick.number=12,

labels=1:12)

))

#################################################################################################################
Regards,
Alireza

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to