openair icon indicating copy to clipboard operation
openair copied to clipboard

scatterPlot: Adjusting axis tick interval

Open josephko91 opened this issue 8 years ago • 1 comments

Dear @davidcarslaw I am new with openair, and fairly new with R. I cannot for the life of me figure out how to manually adjust the x-axis tick marks. For sake of example, I have x = date and y = CBL. I want the x-axis tick to be spaced out for every single day, instead of the default - which is currently showing as every 7 days. I've tried passing the scatterPlot to a variable, then calling the plot, and then using axis() to try to manipulate the plot; but I end up getting an error "plot,new has not been called yet".

Can you please help or direct me to the right resources? It's hard to get help since this function is under this specific package. Thanks!

josephko91 avatar Dec 01 '16 21:12 josephko91

openair plots graphs using lattice package. Try searching questions with "lattice" at the end. Here's a discussion that may solve your problems: http://stackoverflow.com/questions/17584248/exact-axis-ticks-and-labels-in-r-lattice-xyplot

MohoWu avatar Dec 08 '16 14:12 MohoWu