[19210] in s-news-athena

home help back first fref pref prev next nref lref last post

[S]: summary: how to customize boxplot "names"

daemon@ATHENA.MIT.EDU (Bin Chen)
Mon Sep 13 18:30:33 1999

From: pbchen@gsbphd.uchicago.edu (Bin Chen)
To: s-news@wubios.wustl.edu
Date: Mon, 13 Sep 1999 22:24:50 GMT
Message-Id: <37de759d.6748297@gsbpop.uchicago.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 8bit


Thanks a lot to Anona Thorne, Stephen Smith, Tom Richards, and Bill
Dunlap for great help. The basic idea is to use:

my.names_c('1960',rep('',4),'1965',rep('',4),'1970',rep('',4),'1975',rep('',4),'1980',rep('',4),'1985',rep('',4),'1990',rep('',3),'1994')
boxplot(split(data,group),names=my.names)

so the intermediate years are not plotted.

The next problem I had is how to draw the tick marks on the x-axis
correctly. After some experimenting, it turns out that this is perhaps
the only way to do it right:

boxplot(split(data,group),names=my.names,axes=F)
axis(1,at=seq(2,98,96/34),labels=F)

Somehow S-Plus uses a range between 0 and 100 to plot the "names", but
the exact position for the first and last "names" seems to be 2 and
98, respectively. In my case I have 35 years (1960-1994), so ...

BC



-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

home help back first fref pref prev next nref lref last post