BookmarkSubscribeRSS Feed
deleted_user
Not applicable
/** first one has a few hundreds of obs. and a trend chart **/
goptions reset=global
gsfmode=replace
gunit=pct border cback=white ftext=swissb htitle=6 htext=3
colors=(blue green red);
symbol2 value=star color=green;
symbol1 color=red;
proc format;
value test 1 ='Meet'
0 ='Does not Meet';
run;
proc gplot data=safe;
plot J*K=z /hm=5;
format z test.;

/*** the second one is just a line cross the chart with only a few obs */

proc gplot data=safe_second;
plot t10*i /hm=5;
run;


My question:

How can I plot two into one chart?


Thanks.
2 REPLIES 2
DanH_sas
SAS Super FREQ
There may be a couple of options:

1. Turn the second dataset (with the simple line) into an annotation dataset and pass it into the first GPLOT.
2. Assuming the variable names are unique between the two datasets, you can directly merge the two datasets and use the OVERLAY option in GPLOT.

Hope this helps!

-- Dan
deleted_user
Not applicable
Thanks, Dan.

I will follow your directions to try out. Will let you know the result.


Thanks for your help.


Cliff

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1757 views
  • 0 likes
  • 2 in conversation