BookmarkSubscribeRSS Feed
SASdevAnneMarie
Rhodochrosite | Level 12

Hello Experts,

To displya the result of proc sgscatter  (for 18 variables), I use ods graphics on/width=1000in height=1000in but I still have the display issues : the image is too small. Could you help me?

 

Thank you!

 
 
 

 

6 REPLIES 6
PaigeMiller
Diamond | Level 26

Can you show us a screen capture of the problem?

--
Paige Miller
SASdevAnneMarie
Rhodochrosite | Level 12

I attached the output. 

 
 

 

 

 

 

Rick_SAS
SAS Super FREQ

Assuming that you want at least 200 pixels for each graph, a 1000x1000 plot can only hold 5 plots in each dimension. If you are trying to create a matrix that shows the pairwise scatter plot of 18 variables, you are only getting 55 pixels per plot, which is very small.

 

What are you hoping to see in this display, which is going to have 153 scatter plots? Depending upon your goals it might be better to plot subsets of your data instead of trying to see it all at once. For example, there are 10 numeric variables in the SASHELP.CARS data set. If I want to see how all variables are related to the MPG_CITY variable, I can create a big panel, but sometimes it is better to display multiple panels that each have 5-6 graphs, like this:

ods graphics / height=640px width=480px;
title "First group of vars";
proc sgscatter data=sashelp.cars;
  compare y=(MSRP Invoice EngineSize Cylinders Horsepower)
          x=(mpg_city);
run;

title "Second group of vars";
proc sgscatter data=sashelp.cars;
  compare y=(MPG_Highway Weight Wheelbase Length)
          x=(mpg_city);
run;
SASdevAnneMarie
Rhodochrosite | Level 12
Thank you, Rick,
I would like to examine the relationship shown by the scatter plot.
PaigeMiller
Diamond | Level 26

@SASdevAnneMarie wrote:

I would like to examine the relationship shown by the scatter plot.

As I mentioned in your earlier thread, perhaps Principal Components Analysis might be a better approach than 153 scatterplots.

--
Paige Miller
Ksharp
Super User

If you want to output a PDF file ,you can use "options papersize=" to make this PDF bigger to fit this big graph.

 

data have;
call streaminit(123);
array x{*} var1-var20;
do obs=1 to 20;
  do i=1 to dim(x);
    x{i}=rand('normal');output;
  end;
end;
run;

ods _all_ close;
options papersize=(70cm 70cm);
ods pdf file='c:\temp\temp.pdf';
ods graphics /reset=all height=2500px width=2500px outputfmt=png;
proc sgscatter data=have;
  matrix var:/ diagonal=(histogram);
run;
ods pdf close;

Catch up on SAS Innovate 2026

Dive into keynotes, announcements and breakthroughs on demand.

Explore 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
  • 6 replies
  • 478 views
  • 4 likes
  • 4 in conversation