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

I love the heatmapparm statement in sgplot for discrete heatmaps. But now I have a difficult challenge in that my one variable (for the x axis) has about 250 values. I can produce the output I want using:


proc sgplot data=a;   
   styleattrs datacolors=(Blue VeryLightBlue white moderategreen VeryLightRed Red);
   heatmapparm x=response y=factor colorgroup=grouph / discretey discretex;
run;

However, as you can see in the attached pdf, all 250 values of x are displayed, making the presentation worthless. I need to suppress the display of the labels and values for the x axis, but I can't find any options for this. The xaxis statement (which I would normally use to control the axis) does not work in combination with heatmapparm. Even inserting

xaxis;

with no options produces the message

WARNING: HEATMAPPARM statement has a conflict with the axis type. The plot will not be drawn.

and an empty graph is produced. The actual heatmap I am producing is exactly what I want, except I don't want the axis values or label. Alternatively, it would be fine if I could plot every 10th (or so) value of x (with thinning). I am using 9.4(TS1M3). 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

You didn't show any of your attempts at the XAXIS statement.

Try:

    xaxis display=none type=discrete;

You have to tell the axis statement it is discrete so that there is not conflict with the heatparm option of discretex.

When you don't specify the type on the XAXIS then the generic rules are invoked, which means "treat like continuous and if the number of values are small show them all or group".

View solution in original post

4 REPLIES 4
ballardw
Super User

You didn't show any of your attempts at the XAXIS statement.

Try:

    xaxis display=none type=discrete;

You have to tell the axis statement it is discrete so that there is not conflict with the heatparm option of discretex.

When you don't specify the type on the XAXIS then the generic rules are invoked, which means "treat like continuous and if the number of values are small show them all or group".

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

THANKS. For some reason I didn't try type=discrete. Worked perfectly.

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

And I hit my reply as the solution instead of yours. Working too quickly. Sorry.

FreelanceReinh
Jade | Level 19

@lvm wrote:

And I hit my reply as the solution instead of yours. Working too quickly. Sorry.


Hi @lvm,

You can correct this easily: Select ballardw's post as the solution after clicking "Not the Solution" in the option menu (see icon below) of the current solution.
show_option_menu.png

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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
  • 4 replies
  • 1708 views
  • 0 likes
  • 3 in conversation