Date: Sat, 5 Oct 2002 07:15:33 GMT
Reply-To: "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM>
Organization: EarthLink Inc. -- http://www.EarthLink.net
Subject: Re: Using same interval in plot and plot2 statement
"Poul Ravn Sørensen" <firstname.lastname@example.org> wrote in message
> Hi again,
> I'm amazed at the quality of help received here the last couple of days.
> Thank you.
> Another tricky one?
> I am generating multiple graphs using by-groups on proc gplot (two
> Further each graphs has four variables on it, three of them are plotted
> using a plot-statement, the last one, having values shifted relative to
> first three, is plotted using a plot2 statement. Without using macro and
> having to extract min-max values from the data, I want to control the
> and left axis to be spanning the SAME interval. I.e. the 'from' and 'to'
> the axis statement are undetermined, but the span is not.
> Is this possinble using an axis-statement alone?
> Poul R S
Presuming X and Y1-Y4 .
Without an axis defining the order, GPLOT will auto axis the values to be
presented on each PLOT.
The PLOT2 variable (Y4) auto axis is unlikely to have the exact same range
as the PLOT variables (Y1-Y3) auto axis, thus your problem.
You will need to process your data to determine
minVY1, maxVY1 - plot bounds of Y1-Y3
minVY2 - plot bound of Y4
maxVY2 = minVY2 + (maxVY1-minVY1)
If the the dynamic range of Y4 is much more than that of Y1-Y3 many of the
Y4's will not appear (Your source of data may make this unlikely or
If the dynamic ranges are too different, you might consider plotting the
data Z normalized.
Algorithms for how to determine min, max and sensible tick intervals have
been discussed in prior threads.
Richard A. DeVenezia