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-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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