[R] Problems with par() and labels with boxplot

michael watson (IAH-C) michael.watson at bbsrc.ac.uk
Thu Aug 26 11:10:01 CEST 2004


Yes, I thought of that, but when one is creating lots of images
automatically, one doesn't always know how long one's labels are in
advance.

So I guess I need to check how long my labels are and truncate them if
they are too large, or adjust the margins if they are just slightly
bigger than normal.

The different behaviour between Windows and Linux is a bit odd though
(see my previous post)

Mick

-----Original Message-----
From: Peter Dalgaard [mailto:p.dalgaard at biostat.ku.dk] 
Sent: 26 August 2004 09:51
To: michael watson (IAH-C)
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] Problems with par() and labels with boxplot


"michael watson (IAH-C)" <michael.watson at bbsrc.ac.uk> writes:

> Quite a simple one really!
> 
> When I run boxplot(), the labels on the X axis are horizontal, and I 
> want them vertical.  So I did:
> 
> par(las=3)
> boxplot(...)
> 
> And my labels just aren't there anymore....
> 
> Any help???

You may need to make space for them. par(mar=....)

E.g.:

par(las=2,mar=c(10.1,4.1,4.1,2.1))
boxplot(list(foobarbazbletch=rnorm(10),snafu=rnorm(20)))


-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list