Very new to R, have tried multiple different things and can't seem to get it. Need to reduce space between the two plots.
Any idea how to reduce that huge space between two plots?
Very new to R, have tried multiple different things and can't seem to get it. Need to reduce space between the two plots.
Any idea how to reduce that huge space between two plots?
By default stripchart
plots the groups at x-positions 1…n. In your case, that’s at x=1 and x=2. You can control this with the at
parameter:
stripchart(…, at = c(1.25, 1.75))
This for instances moves both groups inwards and makes the spacing more harmonious. Alternatively/additionally you can set the x-limits via xlim
:
stripchart(…, xlim = c(0.5, 2.5))
This has a similar effect as above.