[R] moving columns on a stripchart closer together

Uwe Ligges ligges at statistik.tu-dortmund.de
Tue Jul 21 15:43:14 CEST 2009



Leslie J Seltzer wrote:
> 
> Greetings
> 
> I have a very simple question that I have not been able to solve by reading the manual. When I produce a stripchart with two straight columns of dots representing individual observations, one representing one group of subjects and the other representing another, the columns wind up at the far left and far right sides of the plot, and I'd like them to be closer together, about as far apart as they'd be if I used the boxplot function. I would also like to add a short horizontal line where the mean is for each of the columns, so that my readers can see the results of my significant t test graphically.
> 
> Any assistance in moving my columns together and adding just a short horizontal line for the mean of each would be great.



See the arguments "at", "offset" and the possible arguments "xlim" or 
"ylim".

I'd suggest you control the height/width by xlim/ylim and position the 
columns/rows  by specifying specific "at" values.

You can use lines() to add lines into certain positions of your plot.

Uwe Ligges






> Sincerely,
> 
> Dr. Leslie J. Seltzer
> University of Wisconsin-Madison
> 382 Waisman Center
> 1500 Highland Ave
> Madison, WI 53705
> PHONE: (608) 886 6067
> www.waisman.wisc.edu/childemotion
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list