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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 1578 views
  • 0 likes
  • 2 in conversation