Skip to content
Prev 157060 / 398506 Next

Why horizontal bars instead of a line

Hey Greg!

Thank you very much for your detailed response!!
I really appreciate that!

Yeah, you're right! The axis labels are the way to go ... I was so
focused on getting rid of  the bars, that I didn't even think about
that. 

Sorry for bothering the list about that!

Stefan

-----Original Message-----
From: Greg Snow [mailto:Greg.Snow at imail.org] 
Sent: Wednesday, September 24, 2008 12:06 PM
To: Schreiber, Stefan; r-help at r-project.org
Subject: RE: Why horizontal bars instead of a line

Remember that computers are not as smart as you.  Some smart people have
written instructions for the computer on what to do in certain cases,
but they can't anticipate everything, so when you tell the computer to
do something that was different from what is anticipated, it either
gives an error or the results of a wrong guess.

In your case, since GrSe has a G in the front and your data is probably
in a data frame, the plot function sees a factor (generally what gets
created automatically when characters are seen) and passes the data to
plot.factor which plots boxplots (and with 1 point per year, the 5
number summary for the boxplot gives all the same value, hence the
horizontal line).

What you probably want to do is to plot your clone data against a
numerical representation of the year (without the G), but suppress the
axis labels and add the labels yourself (with the G), see ?axis for
detail on doing this.

Hope this helps,

--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111