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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 3826 views
  • 0 likes
  • 2 in conversation