BookmarkSubscribeRSS Feed
kcsb
Calcite | Level 5

I have created 4 separate plots using proc sgplot and arranged them in a 2x2 grid. when I am trying to save the grid plot to my device, it saves all the four plots individually and not the grid plot. Here's the code I am using:

 

ods listing gpath='path';
ods graphics / imagename="test.png" imagefmt=png;
title 'Panel Plot';
ods layout gridded columns=2 rows=2 column_gutter=0cm row_gutter=0cm column_widths=(14.5cm 14.5cm);

ods region;
proc sgplot data=work.mod1;
series x=Pt_no y=pred1 / group=Group markers;
label Pt_no = "x" pred1 = "y";
title "abc";
styleattrs datacontrastcolors=(big bib crimson);
run;

ods region;
proc sgplot data=work.mod2;
series x=Pt_no y=pred2 / group=Group markers;
label Pt_no = "x" pred2 = "y";
title "bvdfb";
styleattrs datacontrastcolors=(big bib crimson);
run;

ods region;
proc sgplot data=work.mod3;
series x=Pt_no y=pred3 / group=Group markers;
label Pt_no = "x" pred3 = "y";
title "vsedf";
styleattrs datacontrastcolors=(big bib crimson);
run;

ods region;
proc sgplot data=work.mod4;
series x=Pt_no y=pred4 / group=Group markers;
label Pt_no = "x" pred4 = "y";
title "vsrdgr;
styleattrs datacontrastcolors=(big bib crimson);
run;

ods layout end;

 

is there a way to save the grid plot with 300 dpi resolution?

3 REPLIES 3

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 3 replies
  • 996 views
  • 0 likes
  • 2 in conversation