[R] More detail in chart axis?

Jim Lemon jim at bitwrit.com.au
Tue Nov 23 09:52:47 CET 2010


On 11/23/2010 07:24 PM, Noah Silverman wrote:
> Hi,
>
> I have a series of data (about 80,000 pairs of x,y).
>
> Plotting it shows a great chart.  However, R has randomly chosen about 6
> labels for my x axis.  Now, clearly I can't show them all, but would
> like some control over the granularity of what is displayed.  I can't
> find anything in the documentation about controlling the axis data
> labels.  Is there a way?
>
> Alternately, is there a package that would allow me to zoom into an area
> of the chart so I can see more detail?
>
Hi Noah,
"axis" will let you choose the positions, but may leave some out if it 
thinks they are too close. "staxlab" (plotrix) allows you to specify 
positions and labels and can stagger or rotate the labels. zoomInPlot is 
only one way to show a section of the plot next to the original. 
zoomplot (TeachingDemos) allows you to zoom on the same plot. There are 
other functions that offer different zooming methods.

Jim



More information about the R-help mailing list