[R] Label Rotation when Plotting with Factors

From: <mwittmann_at_bren.ucsb.edu>
Date: Sun, 27 Apr 2008 17:15:42 -0700


Hello,

Sorry if this is a repeat, having trouble finding what I need on archive and am a novice with graphics in R!

I have plotted the results of a logit regression by factor, where "city" is the factor set name. The problem is city names are too long and I need to rotate them 90 degrees along the xaxis. This is what I've tried...

plot(city, predicted.probability, xlab = "city"...) axis(1,las = 2)

This does not affect the existing labels.

I have also tried (axes=FALSE), and then rename new with (labels = "Denver", etc. ), but it seems as though I need to maintain the factor identities, as it give me the error: 'labels' is supplied and not 'at'

Any suggestions?

Thank you,

marion wittmann



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. Received on Mon 28 Apr 2008 - 00:20:14 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 28 Apr 2008 - 01:30:33 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive