s-news
[Top] [All Lists]

Re: [S] How do you specify a 0 baseline in barchart?

To: "smillard@probstatinfo.com" <smillard@probstatinfo.com>
Subject: Re: [S] How do you specify a 0 baseline in barchart?
From: Christian Keller <ckeller@aicos.com>
Date: Mon, 25 Jan 1999 09:03:48 +0100
Cc: S-news <s-news@wubios.wustl.edu>
Organization: AICOS Technologies AG (http://www.aicos.com)
References: <01BE46B0.67896AC0.steven.p.millard@cwix.com>
Sender: owner-s-news@wubios.wustl.edu
"Steven P. Millard" <steven.p.millard@cwix.com> wrote:

>> I'm comparing dot plots and bar charts for some data. I'd
>> like to be able to specify a 0 baseline in the call to
>> barchart(), but don't know how.  Using the xlim argument
>> does not work of course, since this only specifies the
>> approximate x-axis minimum and maximum.  I thought about 
>> playing around with setting the usr graphics parameter,
>> but I'm pretty sure trellis functions ignore that.
>> 
>> Here is an example:
>> 
>> dum.df <- data.frame(Mileage = fuel.frame$Mileage,
>>                      Name = row.names(fuel.frame),
>>                      Type = fuel.frame$Type)
>> 
>> barchart(Name ~ Mileage, data=dum.df, subset=Type=="Van")

Use the xlim argument together with the *undocumented*
argument 'axs' to scales:

barchart(Name ~ Mileage, data=dum.df, subset=Type=="Van",
         xlim=c(0,21), scales=list(x=list(axs="i")))


Christian Keller
-- 
----------------------------------------------------------
Christian Keller                Tel:      +41 61 686 98 81
AICOS Technologies AG           Fax:      +41 61 686 98 88
Efringerstrasse 32              E-mail:  ckeller@aicos.com
CH-4057 Basel, Switzerland      Web: http://www.aicos.com/
----------------------------------------------------------
-----------------------------------------------------------------------
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

<Prev in Thread] Current Thread [Next in Thread>