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

I'd like to output two plots from these two different datasets to a single plot (side to side). Tried panelling with no success yet. Tried "thickness=n" to bolden up the lines a bit. No success yet, again. Any ideas for both issues? Using SAS 9.4.

 

title "MODEL FIT TO DUPLICATE DATA";
proc sgplot data=mydata1;
   step x=ECDFX y=ECDFY / legendlabel="ECDF";
   step x=ECDFX y=NBCDF / legendlabel="Model Fit to Negative Binomial / Duplicated Data";
   step x=ECDFX y=PoisCDF / legendlabel="Model Fit to Poisson / Duplicated Data";
   xaxis grid label="Rate" offsetmin=0.0 offsetmax=0.0 min=0 max=80;
   yaxis grid min=0 label="Cumulative Proportion";
run;

title "MODEL FIT TO UNIQUE ENTITY DATA";
proc sgplot data=mydata2;
   step x=ECDFX y=ECDFY / legendlabel="ECDF";
   step x=ECDFX y=NBCDF / legendlabel="Model Fit to Negative Binomial / Unique Entity Data";
   step x=ECDFX y=PoisCDF / legendlabel="Model Fit to Poisson / Unique Entity Data";
   xaxis grid label="Rate" offsetmin=0.0 offsetmax=0.0 min=0 max=80;
   yaxis grid min=0 label="Cumulative Proportion";
run;

S

1 ACCEPTED SOLUTION

Accepted Solutions
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Yes, use graph template language - you can get most ot the code by adding:

proc sgplot data=mydata1 tmplout="c:\temp.txt";
 

In and looking at the created temp.txt file.  You can see a vast array of graphs, all different types/techniques with code examples in template, sgplot by looking at Sanjay's blog:

http://blogs.sas.com/content/graphicallyspeaking/

It contains almost every graph you can think of, so copy the code from there. 

View solution in original post

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Yes, use graph template language - you can get most ot the code by adding:

proc sgplot data=mydata1 tmplout="c:\temp.txt";
 

In and looking at the created temp.txt file.  You can see a vast array of graphs, all different types/techniques with code examples in template, sgplot by looking at Sanjay's blog:

http://blogs.sas.com/content/graphicallyspeaking/

It contains almost every graph you can think of, so copy the code from there. 

Jay54
Meteorite | Level 14

If the graphs are independent, you can place them side by side in a document like PDF or RTF using the ODS LAYOUT statement along with the ODS REGION statements.  If you really want the graphs in one PNG file, you should really use GTL, with a LAYOUT LATTICE.  See SASGF 2016 paper "Up Your Game with GTL Layouts".  See topic "CREATING MULTI-CELL GRAPH WITH LAYOUTS LATTICE" on page 9.  

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
  • 2137 views
  • 2 likes
  • 3 in conversation