[R] Adjusting format of boxplot
Gerrit Eichner
Gerrit.Eichner at math.uni-giessen.de
Fri Jul 13 10:09:17 CEST 2012
Hello, Ivan,
you'll find argument frame (actually frame.plot) explained in
?plot.default
Regards -- Gerrit
> Hi Peter,
>
> I had never heard of this 'frame' argument and it's a breakthrough for me to
> be finally able to get rid of this frame!
>
> But where is this argument explained? I couldn't find it in plot(),
> boxplot(), bxp() or par().
>
> Thank you for your answer :)
> Ivan
>
> --
> Ivan CALANDRA
> Université de Bourgogne
> UMR CNRS/uB 6282 Biogéosciences
> 6 Boulevard Gabriel
> 21000 Dijon, FRANCE
> +33(0)3.80.39.63.06
> ivan.calandra at u-bourgogne.fr
> http://biogeosciences.u-bourgogne.fr/calandra
>
> Le 13/07/12 04:48, Peter Ehlers a écrit :
>> On 2012-07-12 18:39, David L Carlson wrote:
>>> Sorry about that. I got rid of the box another way and then switched to
>>> using pars=
>>> without making sure it worked. This works:
>>>
>>> flies$group <- factor(flies$group, 5:1) # 1
>>> levels(flies$group) <- paste0("Group ", 5:1) # 2
>>>
>>> oldpar <- par(bty="n")
>>> boxplot(long ~ group,
>>> data = flies,
>>> pars=list(las=1, ylim=c(10, 110), xaxt="n"),
>>> horizontal = TRUE,
>>> col = "red")
>>>
>>> axis(1, at=seq(10, 110, 20))
>>> par(oldpar)
>>
>> Or you could add 'frame = FALSE' to the boxplot() call.
>>
>> Peter Ehlers
>>
>>>
>>> -------------------------------------
>>> David
>>>
>>> -------------------------------------
>>> David L Carlson
>>> Associate Professor of Anthropology
>>> Texas A&M University
>>> College Station, TX 77840-4352
>>>
>>>
>>> ----- Original Message -----
>>>
>>> From: "darnold" <dwarnold45 at suddenlink.net>
>>> To: r-help at r-project.org
>>> Sent: Thursday, July 12, 2012 7:53:33 PM
>>> Subject: Re: [R] Adjusting format of boxplot
>>>
>>> Added your code:
>>>
>>>
>>> flies <- read.table("example12_1.dat",header=TRUE,sep="\t")
>>>
>>> flies$group <- factor(flies$group,5:1)
>>>
>>> levels(flies$group) <- paste0("Group ",5:1)
>>>
>>> boxplot(long ~ group,
>>> data = flies,
>>> pars = list(las=1, ylim=c(10,110), xaxt="n", bty="n"),
>>> horizontal = TRUE,
>>> col = "red")
>>>
>>> axis(1,at=seq(10,110,20))
>>>
>>> Almost worked perfectly, except the frame around the plot remains, which
>>> is
>>> strange as you have bty="n".
>>>
>>> http://r.789695.n4.nabble.com/file/n4636381/Rplot11.png
>>>
>>> David
>>>
>>
>> ______________________________________________
>> 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.
>>
>>
>
> ______________________________________________
> 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