BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
hein68
Quartz | Level 8

Hello.  I'm using proc corr and I want it to create 16 scatterplots.  I know there is a limit to the number of scatterplots it will create, but I was also told that there is an option I can add to get all of the scatterplots.  Can you help me?  Here is my code:

ODS GRAPHICS ON;
PROC CORR DATA=data
	PLOTS=(SCATTER MATRIX)
	PEARSON
	SPEARMAN
	VARDEF=DF
	;
	VAR bfpwv_b cfpwv_b;
	WITH socstress_b hwss_ism hwss_ssm hwss_rsm hwss_fsm hwss_psm hwss_esm fossc_b;
RUN;
ODS GRAPHICS OFF;
1 ACCEPTED SOLUTION

Accepted Solutions
3 REPLIES 3
FreelanceReinh
Jade | Level 19

Hello @hein68,

 

Add the NWITH=ALL option:

PLOTS=(scatter(nwith=all) matrix(nwith=all))

 

Moreover, if the total number of data points in the scatter plot matrix exceeds 5000, you will need to add the MAXPOINTS=NONE option:

PLOTS(maxpoints=none)=(scatter(nwith=all) matrix(nwith=all))
hein68
Quartz | Level 8

That helped, thanks!!!

ballardw
Super User

If the plots are all you are interested in you might also consider Proc SGSCATTER. The Compare statement allows similar list of x and y variables for the plots.

Or go whole hog and display regressions with the plots...

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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
  • 404 views
  • 4 likes
  • 3 in conversation