[R] dotplot with library lattice

Jim Lemon jim at bitwrit.com.au
Thu Oct 30 09:34:43 CET 2014


On Thu, 30 Oct 2014 09:25:53 AM Matthias Weber wrote:
> Hi Jim,
> 
> the graph looks at the moment nearly perfect. I have one last 
question.
> How can I change the scaling of the x-axis. At the moment i see the 
values
> at 0,20,40,60,80,100.
> 
> My wish is, that the x-axis looks like the abline, so the scaling for the
> x-axis should be at 0,25,50,75,100.
> 
> Thanks a lot.
> 
> Best regards.
> 
> Mat

Hi Mat,
Add xaxt="n" to the plot command to suppress the default x axis:

plot(rep(100,13),1:13,main="IST against Budget",
 xlab="IST/Budget (prozent)",ylab="KOST",
 xlim=c(0,100),type="n",xaxt="n",yaxt="n")

and add a custom x axis:

axis(1,at=c(0,25,50,75,100))

Jim



More information about the R-help mailing list