Re: [R] boxplot and xlim confusion?

From: Petr Pikal <petr.pikal_at_precheza.cz>
Date: Fri 30 Sep 2005 - 01:39:04 EST

Hi

So you need x to be same in all subsequent plots e.g. from -5 to 5 like in this.

boxplot(split(rnorm(30), rep(1:3, each=10)), horizontal =T, names=letters[1:3], ylim=c(-5,5))

You find it in a thorough reading bxp man page.

Currently, 'ylim' is used 'along the boxplot', i.e.,

          vertically, when 'horizontal' is false.

So if horizontal is true you still need to use ylim not xlim :-)

HTH
Petr

On 29 Sep 2005 at 15:28, Karin Lagesen wrote:

To:             	"Petr Pikal" <petr.pikal@precheza.cz>
From:           	Karin Lagesen <karin.lagesen@medisin.uio.no>
Date sent:      	Thu, 29 Sep 2005 15:28:14 +0200
Copies to:      	r-help@r-project.org,
	Karin Lagesen <karin.lagesen@medisin.uio.no>
Subject:        	Re: [R] boxplot and xlim confusion?

> "Petr Pikal" <petr.pikal@precheza.cz> writes:
>
> > Hi Karin
> >
> > I did not have seen any answer for your question yet so here is a
> > try.
> >
> > I gues you want the horizotal layout or your boxplot.
> >
> > boxplot(split(rnorm(30), rep(1:3, each=10)), horizontal =T,
> > names=letters[1:3])
> >
> > boxplot(split(rnorm(30), rep(1:3, each=10)), horizontal =T,
> > names=c(NA,"b",NA))
>
> These look like the plots I want, yes. However, is there a way of
> locking the x-axis? When I do these several times in a row, the range
> of the x axis moves with the data being plotted. If I set xlim in the
> boxplot command, it makes no difference what so ever.
>
>
> > So this is closest what I could dig from your text.
> >
> > ***reproducible*** example would by good starting point what you
> > want and was not able to produce.
>
> Sorry about that...:)
>
> Karin
> --
> Karin Lagesen, PhD student
> karin.lagesen@medisin.uio.no
> http://www.cmbn.no/rognes/
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html

Petr Pikal
petr.pikal@precheza.cz



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Sep 30 01:42:36 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 17:59:57 EST