[R] axis in r plot

Jim Lemon jim at bitwrit.com.au
Sat Jun 23 00:35:18 CEST 2012


On 06/22/2012 09:51 PM, sathya7priya wrote:
> I have a graph plotted in r.The x axis tickmarks are at 0,5,10. I need a
> graph with resolution of tickmarks at 0.1 interval.When i place tickmarks of
> 0.1 intervals using the following command   axis(1, at=seq(0,5,0.1),
> cex.axis=0.7, las=2)  I only get the tickmarks of 0.1 interval that are very
> closed placed in the graph.I need to increase the spacing between each
> tickmark. Please anyone help out this.
>
Hi sathya7priya,
I'm going to try mind reading again, so here is a possible solution.

plot(1:5,xaxt="n")
axis(1,at=seq(0,5,by=0.1),labels=rep("",51))
axis(1,at=1:5)

Jim



More information about the R-help mailing list