[R] Changing labels positions in two graphics

R. Michael Weylandt michael.weylandt at gmail.com
Thu Aug 2 01:13:16 CEST 2012


Hi -- these sorts of graphical parameters are documented in ?par, but
it's admittedly somewhat terrifying to try to read (Oh well, the cost
of comprehensiveness)  -- you're looking for either las or (less
likely, but might work if you can draw the labels manually) str, both
documented on that page.

E.g,

boxplot(sample(10, 25, TRUE) ~ sample(paste0(letters[1:4], "defas"),
25, TRUE), las = 2)

Best,
Michael

On Wed, Aug 1, 2012 at 12:15 PM, gaiarrido <gaiarrido at usal.es> wrote:
> Hi,
>  I´ve got some problems with the labels of the x-axis
> I,ve got two factors with two categories each: sex (males and females) and
> area (central and peninsulae),
> but because of the lenngth in  the graphic just appeared two of the four
> labels.
> I thought the solution could be rotate it 45º degrees, I have read it can be
> done with "srt" or "rotate", but I don´t know hoe to use it.
> http://r.789695.n4.nabble.com/file/n4638722/boxplot_lg_haemogregarines%7Earea%26sex.jpeg
> The graphic has been generated like this.
> boxplot(log(hemogregarinas+0.5)~area*sex,notch=F,col=(c("white","grey")),ylab="SVL",boxwex=0.4)
>
> Where should i put an order to ratate those labels
>
> I´ve got a similar problem with a pie chart , one of the pieces overlaps
> with one label,here´s the order and the pie chart
> pie3D(eyspen,labels = lblsp, col=(c("dark grey","white","light
> grey")),explode=0.1,main="% of age-sex categories in Peninsulae")
> http://r.789695.n4.nabble.com/file/n4638722/3D_pie_population_Penins.jpeg
>
> Thanks in advance
> Thanks in advance
>
>
>
> -----
> Mario Garrido Escudero
> PhD student
> Dpto. de Biología Animal, Ecología, Parasitología, Edafología y Qca. Agrícola
> Universidad de Salamanca
> --
> View this message in context: http://r.789695.n4.nabble.com/Changing-labels-positions-in-two-graphics-tp4638722.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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