Hello, I'm plotting an xyplot where a continuous var recorded every min is plotted on y, and time expressed as HH:MM:SS on x, as follows : xaxis=list(tick.number=12,rot=90) lst=list(x=xaxis) xyplot(upt$LOAD_1 ~ upt$TIME, data=upt, type=c('g','p', 'r'), scales=lst) On the x-axis, every time label is drawn and the label quickly become unreadable as they overlap on each other. I wished to limit the number of label with 'tick.number=12' but it does not work as the x values are not treated as a numerical sequence. How can I limit the number of ticks and labels for a time series expressed as HH:MM:SS ? One way might be to convert to mins from an origin, the result would be less expressive though. Thank you for any help. -- View this message in context: nabble.com/Customize-axis-labels-in-xyplot-tp24126788p24126788.html Sent from the R help mailing list archive at Nabble.com.
On Sat, Jun 20, 2009 at 9:13 AM, nmset<nmset at netcourrier.com> wrote:> > Hello, > > I'm plotting an xyplot where a continuous var recorded every min is plotted > on y, and time expressed as HH:MM:SS on x, as follows : > > xaxis=list(tick.number=12,rot=90) > lst=list(x=xaxis) > xyplot(upt$LOAD_1 ~ upt$TIME, data=upt, type=c('g','p', 'r'), scales=lst) > > On the x-axis, every time label is drawn and the label quickly become > unreadable as they overlap on each other. > > I wished to limit the number of label with 'tick.number=12' but it does not > work as the x values are not treated as a numerical sequence. > > How can I limit the number of ticks and labels for a time series expressed > as HH:MM:SS ? > > One way might be to convert to mins from an origin, the result would be less > expressive though.A reproducible example would help. Have you tried using a date-time class? -Deepayan
I have attached 2 files sample.csv and sample.r to illustrate the problem. Thank you for considering. -- View this message in context: nabble.com/Customize-axis-labels-in-xyplot-tp24126788p24143742.html Sent from the R help mailing list archive at Nabble.com.
On Mon, Jun 22, 2009 at 1:54 AM, nmset<nmset at netcourrier.com> wrote:> > I have attached 2 files sample.csv and sample.r to illustrate the problem.No attachments came through. -Deepayan
I found indeed that there were no attachements yesterday and corrected the mistake. They are in my previous post. Thanks. -- View this message in context: nabble.com/Customize-axis-labels-in-xyplot-tp24126788p24180049.html Sent from the R help mailing list archive at Nabble.com.