-----Original Message-----
From: Marc Schwartz [mailto:[EMAIL PROTECTED]
Sent: Friday, 14 November 2003 12:49 AM
To: Paul Sorenson
Cc: [EMAIL PROTECTED]
Subject: Re: [R] xlims of barplot


On Wed, 2003-11-12 at 23:54, Paul Sorenson wrote:
>> I would like to create a family of barplots with the same xlimits.  Is
>> there a way to "read" the xlimits from the first graph so I can apply it to
>> the subsequent ones?
>> 
>> I have tried just taking the min and max of the x data and the plot doesn't
>> show.
>> 
>> cheers
>
>A point of clarification:
>
>When you say x axis limits, are you referring to the bar heights in a
>horizontal barplot or are you referring to the range of the x axis with
>vertical bars?  A critical difference.
...
>If you are talking about a vertical barplot, then the x axis range will
>be the same for each barplot under the following conditions, without
>having to set it:
>
>1. You have the same number of bars in each plot
>2. You do not change the values of 'space', 'width' or 'beside' across
>the plots.
>
>Also, keep in mind that the bars are NOT centered over integer values on
>the respective axis. You can get the bar center positions by using:

Sorry for being vague, it is the latter case, vertical bars.  The data
doesn't satisfy condition 1.  The family of 6 plots is datestamped data,
the first plot showing all defects, then each subsequent plot showing
defects of each severity level we define.  The min and max of each of the
subsequent datasets is in general a subset of the full dataset.  I can
easily plot them but it would be nice to keep the same x limits on each
graph.  The x data is POSIXct although I suspect that is not relevant.


        [[alternative HTML version deleted]]

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to