[R] boxplot - margin settings

Sarah Goslee sarah.goslee at gmail.com
Wed Apr 29 16:12:40 CEST 2009


boxplot() isn't passing extra parameters in the way you'd expect. If
you set par() first, it works fine.

mar.orig <- par()$mar # save the original values
par(mar = c(20,4,4,4)) # set your new values
boxplot(data, las = 2)
par(mar = mar.orig) # put the original values back

Sarah

On Wed, Apr 29, 2009 at 10:06 AM, Antje <niederlein-rstat at yahoo.de> wrote:
> Hi there,
>
> I'm trying to solve a boxplot problem (should be simple, but I cannot find
> the solution...):
>
> data <- list(   "long_name1_xxxxxxxxxxx" = rnorm(100),
>                "long_name2_yyyyyyyyyyyyyy" = rnorm(200))
> boxplot(data , las = 2, mar = c(20,4,4,4))
>
> Why does the margin not change whatever I put there???
> With other plots it worked for me, why not in this case?
> I just want to see the whole label...
>
> I'm really sorry if I've missed a very obvious reason for this behaviour.
> Maybe someone can help me?
>
> Ciao,
> Antje
>


-- 
Sarah Goslee
http://www.functionaldiversity.org




More information about the R-help mailing list