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

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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