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...

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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