LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2002, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Content-Type: text/plain;

"Poul Ravn Sørensen" <poulravn1@hotmail.com> wrote in message news:3d9d47c0$0$96779$edfadb0f@dspool01.news.tele.dk... > 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 levels). > 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 the > 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 right > and left axis to be spanning the SAME interval. I.e. the 'from' and 'to' of > the axis statement are undetermined, but the span is not. > > Is this possinble using an axis-statement alone? > > Regards > > Poul R S >

No.

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 and compute 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 impossible.)

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 http://www.devenezia.com/


Back to: Top of message | Previous page | Main SAS-L page