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

Dear all,

 

I am using Chris Hemedinger's code posted here:

http://blogs.sas.com/content/sasdummy/2013/06/12/correlations-matrix-heatmap-with-sas/

 

to get a heat map of my correlation matrix. The only problem is I have too many variables(>40) so the labels on the axis all overlap and aren't readable anymore.

 

I think there should be a fix - manipulating the X axis or Y axis display options --- but I'm a total novice with SAS graphics and am not sure what to do. The heat map itself is generated just fine, only the variable names are all lost. Maybe I should try truncating the varaible names? 

 

Thanks for any advice!

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

@nstdt wrote:

 Chris Hemedinger kindly gave a solution to my question posted on his blog:

 

If you want the labels and values to be readable, you might just need to increase the dimensions of the graph:

ods graphics /height=1500px width=1500px imagemap tipmax=4000;

Adding the TIPMAX option allows the higher number of hover-over tips to be included as well.

 

This gives  better output, though I don't know how I would manage if I had more than 40 variables...

 

 


Shorter labels that key to a text table for reference perhaps. And sometimes the scope just needs to be reduced.

View solution in original post

3 REPLIES 3
ballardw
Super User

Easiest may be to change the height and width options on the the ODS GRAPHICS statement ODS Graphics/ height=10in width=10in may get you close, second would be to reduce the font size of the axis label text and third I would look closely  at whether I needed all of the text currently displaying as an axis label. Shorter labels may help.

 

 

 

 

nstdt
Quartz | Level 8

 Chris Hemedinger kindly gave a solution to my question posted on his blog:

 

If you want the labels and values to be readable, you might just need to increase the dimensions of the graph:

ods graphics /height=1500px width=1500px imagemap tipmax=4000;

Adding the TIPMAX option allows the higher number of hover-over tips to be included as well.

 

This gives  better output, though I don't know how I would manage if I had more than 40 variables...

 

I tried other options (some suggested below) such as setting tickvalueattrs--- within the xaxisopt code:xaxisopts=(display=(line ticks tickvalues tickvalueattrs=(size=4pt weight=bold)))--- to reset the font but these did not work.

 

 

ballardw
Super User

@nstdt wrote:

 Chris Hemedinger kindly gave a solution to my question posted on his blog:

 

If you want the labels and values to be readable, you might just need to increase the dimensions of the graph:

ods graphics /height=1500px width=1500px imagemap tipmax=4000;

Adding the TIPMAX option allows the higher number of hover-over tips to be included as well.

 

This gives  better output, though I don't know how I would manage if I had more than 40 variables...

 

 


Shorter labels that key to a text table for reference perhaps. And sometimes the scope just needs to be reduced.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of 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
  • 4304 views
  • 0 likes
  • 2 in conversation