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 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 4 replies
  • 767 views
  • 0 likes
  • 3 in conversation