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>
Bretschneider (R)
2013-Oct-17 16:14 UTC
[R] plot - how to vary the distances of the x axis?
On 17 Oct 2013, at 13:44 , Hermann Norpois wrote:> 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") >> > > ThanksIf I understand what you want, set xlim() a bit wider, within in the plot-statement: xlim=c (-0.4,2.4), ylim=c(0,80) Hope this helps, Best wishes, Franklin ----- Dr. Franklin Bretschneider Dept of Biology Utrecht Unversity Padualaan 8 3584 CH Utrecht The Netherlands f.bretschneider@uu.nl [[alternative HTML version deleted]]