LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (January 2003, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 13 Jan 2003 07:29:15 -0800
Reply-To:     Bobby Kidd <rakidd@FTB.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Bobby Kidd <rakidd@FTB.COM>
Organization: http://groups.google.com/
Subject:      2 plots on the same axes
Content-Type: text/plain; charset=ISO-8859-1

Fred, In order to be able to plot your data on the same set of axes you must (by definition) have at least your dependent variable in common. In this case "Age". Try merging the two datasets by Age. Then you can use the overlay option in proc plot.

Proc Plot data = Merged_Data; plot Age * Sta Age * Category_Mean/ OVERLAY; run;

This will plot both graphs on the same plot. But it does require a merged dataset.

Age STA Category_Mean 40 0 .2 40 1 .2 40 0 .2 50 1 .4 50 0 .4 . . . 70 1 .5

Since this will be a one to many merge check to insure that having multiple identicle points will not change your "-" marker to something that is indicative of how many overlapping points there are (i.e. "B", "C" for 2 and 3 overlapping points).

Good Luck, HTH,

Bobby

fredgerson@aol.com (Fred Gerson) wrote in message news:<8064c3a.0301121325.5d053127@posting.google.com>... > Hey all, > > I'm doing a Logistic Regression problem where I have to combine both a > scatterplot of raw data, and a summary plot of the means of the data > grouped by certain intervals, on the same set of axes. The dataset > looks like > > AGE STA > 45 1 > 56 0 > 55 1 > 47 0 > ... > > I'm using proc format to group the age variable into categories and > then proc means to give me mean values for STA for each of the > categories. I can get the plots I want by seperately by using 2 proc > plots but I want to combine these two graphs. > > proc plot data=LogReg; > plot age * sta; > > gives me something like > > 1 ABBCB > | > | > 0__ABACA____ > 40 50 60 70 80 > > and > > proc plot data=LogRegMean; *dataset from means proc above; > plot agemean * categorymean = "-"; > > gives me something like > > | - > | - > | - > | - > | - > -40-50-60-70-80- > > proc plot won't let me use two different datasets in a single > procedure, so I'm at a loss as to how to put these two graphs on the > same axes. > > Thanks so much, > Fred


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