1

I would like to shorten the x-axis in a stripchart so it isn't going way past my data. How can I do this?

I used at = seq(1, length.out = length(unique(Avagno0 $NugentScore)), by = 0.5) to bring the spacing between colmuns closer together. This is the picture of the graph:

enter image description here

Any help is greatly appreciated!

nograpes
  • 18,623
  • 1
  • 44
  • 67

1 Answers1

0

You need to use par to set the outer margins if you want a narrower plot window.

narrow.at <- seq(1,length.out=length(unique(OrchardSprays $treatment)), by=0.5)
par(oma=c(1,1,1,5))
stripchart(decrease ~ treatment,
     main = "stripchart(OrchardSprays)",
     vertical = TRUE, log = "y", at=narrow.at, data = OrchardSprays,
     xlim=c(0.5,max(narrow.at)+.5) )
IRTFM
  • 258,963
  • 21
  • 364
  • 487