[R] Space between x-axis ticks

Jim Lemon jim at bitwrit.com.au
Fri Sep 27 14:14:11 CEST 2013


On 09/27/2013 09:22 PM, mohan.radhakrishnan at polarisft.com wrote:
> Hi Jim,
>
> Yes. The attached graph has less values. When there are more the values
> are too close even though after the beginning and ending tick there is
> enough space to evenly distribute the ticks.
> Is there a parameter to specifcy the space between the ticks. I used
> 'space' in boxplots.
>
>
Hi Mohan,
The space between the ticks is determined by the number of ticks and the 
length of the x axis:

<space between ticks> = <length of x axis>/<number of ticks>

So, if you make the x axis longer by increasing the width of the plot, 
there will be more space for more tick labels. You can increase the 
number of lines that "staxlab" will use to display labels, but more than 
three lines is usually too difficult to read. you can also try rotating 
the labels (see the "srt" argument in staxlab) rather than staggering them.

Jim



More information about the R-help mailing list