[R] plot - how to vary the distances of the x axis?

Hermann Norpois hnorpois at gmail.com
Thu Oct 17 13:44:44 CEST 2013


Hello,


my dots of 0 and 2 are quite close to the marging. So I would like to move
the 0 and the 2 both towards the 1. I wish to be my dots more centered.
And: I dont need so much space between 0,1 and 2.

How does it work?
I tried:

plot (data, axes=FALSE, main=i, ylab= expression (z^2))
              plot.window (xlim=c (0,2), ylim=c(0,80))
              box (lwd=2)
              axis (side=1, at = c (0,1,2))
              axis (side =2)

dput (data)
structure(list(Genotype = c(0, 0, 0, 1, 1, 1, 1, 1, 2), z =
c(0.66429502114682,
0.258444359570075, 0.0702937908415368, 0.694376498254858,
0.0967863570760579,
0.213966209301163, 0.671497050546114, 0.60318070802847, 75.6011068681301
)), .Names = c("Genotype", "z"), row.names = c(NA, 9L), class =
"data.frame")
>

Thanks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: move.png
Type: image/png
Size: 5312 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20131017/582b7e52/attachment.png>


More information about the R-help mailing list