Skip to content

reorder x-axis

2 messages · stephen sefick, John Kane

#
read.table("bug.txt", header=TRUE)
plotMeans(bug$tot, bug$station, error.bars="se", main="Total")

The plot is ordered in this way HC RM190 RM198 RM202.
I would like it to plot in this way HC RM202 RM198 RM190.

thanks
Stephen

Is this okay or would you like the data to be copied and pasted into
the message body.  I am trying to optimize my postings.
#
Have a look at the posting guide (link at bottom of
the post).  :) 

It is much easier to see what is happening if you
submit an working example.  At the moment we'd just be
guessing at what you're doing.

If there is much data it would be much better to
supply a small subset (that includes all
alternatatives).  A hundred lines of data usually is
not needed.  Five-ten lines of data probably is great.
  

My guess at the moment is that you can rearrange the
data.frame (if it is a data.frame) by using somehting
like this (where aa simple is representing the
data.frame)

aa <- c("HC", "RM190", "RM198" ,"RM202")
vect <- c(1, 4, 3,2)
bb <- aa[vect]
--- stephen sefick <ssefick at gmail.com> wrote: