[R] plotting order in a barchart.: two problems
jrkrideau at yahoo.ca
Sat Apr 22 14:17:54 CEST 2006
Thanks Uwe, I managed to get it to work. I still
don't quite understand what I was doing wrong and so
probably could not provide reproducable code.
Still, every day I learn a bit more.
--- Uwe Ligges <ligges at statistik.uni-dortmund.de>
> John Kane wrote:
> > I am new at R and have a simple problem, I think.
> > have a matrix:
> > [,1] [,2] [,3]
> > a .5 2 .4
> > b 4 3.4 4
> > c 4 4 2
> > I want a barchart with the [,1] column plotted as
> > left-most group on a vertical bar chart or as the
> > group on a horizontal chart. However the plotting
> > order is , [,3] [,2] [,1].
> Hmm, works for me in the correct order at once:
> barplot(X, beside = TRUE)
> But maybe you want to show us some reproducible code
> Uwe Ligges
> > I also am having a problem getting the rows to
> plot on
> > a vertical chart in the order : a , b, c . I
> > this in a horizontal chart by doing a cbind(c,b,a)
> > for some reason I do not seem to be getting this
> > work for the vertical chart.
> > Nothing in Sort() or Order() seem particularly
> > appropriate ( or I don't understand what the help
> > telling me).
> > Any suggestions would be appreciated.
> > ______________________________________________
> > R-help at stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide!
More information about the R-help