Re: [R] Barchart to make a graph like this??

About this list Date view Thread view Subject view Author view Attachment view

From: Andrew C. Ward (s195404@student.uq.edu.au)
Date: Wed 14 May 2003 - 08:47:58 EST


Message-id: <1052866078.3ec1761ec3149@my.uq.edu.au>

Ken, I actually asked about doing this on the list sometime ago
and received a number of very useful suggestions. If you search
the archives for "Christmas tree graphs" you'll discover all you
need to know (and more).

Regards,

Andrew C. Ward

CAPE Centre
Department of Chemical Engineering
The University of Queensland
Brisbane Qld 4072 Australia
andreww@cheque.uq.edu.au

Quoting Deepayan Sarkar <deepayan@stat.wisc.edu>:

> On Tuesday 13 May 2003 03:00, knussear@biodiversity.unr.edu
> wrote:
> > Hi list,
> >
> > I'm trying to get R to make a graph like the one shown in
> this pdf, where
> > males are white bars and females are black bars.
> >
> > http://www.brrc.unr.edu/~knussear/mmgraph.pdf
> >
> > I tried barchart, but I couldnt get the bars to share a
> common x axis.
>
> I'm assuming by this you mean barchart in the lattice package.
>
> > Do you have any suggestions?
>
> Some information on the form of your data would have helped.
>
> This is not the standard form of a barchart, so you need to
> fudge some things.
> First of all, make the values in one of the groups (the ones
> you want on the
> left) negative. Then barchart with groups (or use + in the
> formula, depending
> on the form of your data), stack=TRUE should give you what you
> want. Of
> course, the axis labels will be negative, you need to control
> those using
> scales.
>
> HTH,
>
> Deepayan
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Tue 01 Jul 2003 - 09:11:49 EST