BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Cruise
Ammonite | Level 13

Hello SAS experts,

I'd like to create a Desired Plot on the right in the image?

Any comments or demo codes highly appreciated.

 

Acknowledgement: The code here was suggested by DanH_sas. 

proc import datafile="...\plot.txt"
out=plot
dbms=tab replace;
guessingrows=max;
run;
proc sgplot data=PLOT /*data attached*/;  
series x=risk_out y=mean_bias / group=agecat;
series x=risk_in y=mean_bias / group=agecat x2axis transparency=1;
run;

 PLOT_IMAGE_NEW.png

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
DanH_sas
SAS Super FREQ

To get that graph, you will also need a REVERSE:

 

proc import datafile="...\plot.txt"
out=plot
dbms=tab replace;
guessingrows=max;
run;
proc sgplot data=PLOT /*data attached*/;  
series x=risk_out y=mean_bias / group=agecat;
series x=risk_in y=mean_bias / group=agecat x2axis transparency=1;
x2axis reverse;
run;

Hope this helps!
Dan

View solution in original post

1 REPLY 1
DanH_sas
SAS Super FREQ

To get that graph, you will also need a REVERSE:

 

proc import datafile="...\plot.txt"
out=plot
dbms=tab replace;
guessingrows=max;
run;
proc sgplot data=PLOT /*data attached*/;  
series x=risk_out y=mean_bias / group=agecat;
series x=risk_in y=mean_bias / group=agecat x2axis transparency=1;
x2axis reverse;
run;

Hope this helps!
Dan

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
  • 1 reply
  • 557 views
  • 1 like
  • 2 in conversation