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

I want to creat a graph: the X-axis is hour, the Y-axis is date, the value is continuious data(half-hourly temperature of  a year) ,which was going to show with continuious color. it will look link a fingerprint.

How to code in SAS?

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
DanH_sas
SAS Super FREQ

Try something like this:

 

proc sgplot data=temperatures;

heatmap x=hours y=date / colorresponse=values;

run;

 

Hope this helps!
Dan

View solution in original post

10 REPLIES 10
DanH_sas
SAS Super FREQ

Try something like this:

 

proc sgplot data=temperatures;

heatmap x=hours y=date / colorresponse=values;

run;

 

Hope this helps!
Dan

Shawnkao
Calcite | Level 5

Thank you for your quick reply.

I have tried, but heatmap is not valid or it is used out of proper order.

I think it is the problem of my SAS edition.

 

DanH_sas
SAS Super FREQ

What version of SAS do you have?

 

%put &sysvlong;

Shawnkao
Calcite | Level 5

9.04.01M2P072314

Is it the version?

DanH_sas
SAS Super FREQ

You have SAS 9.4m2. The HEATMAP and HEATMAPPARM statements where not introduced until SAS 9.4m3. Do you have access to that version or later?

Shawnkao
Calcite | Level 5

Not yet. I'll try to get the new verison. But it maybe difficult.

Anyway, thank you so much for your kind help.

Shawnkao
Calcite | Level 5

Hi Dan,

Is the version of "SAS OnDemand for Acadamic" available for heatmap?

Thanks.

DanH_sas
SAS Super FREQ

Yes, it should have it.

Shawnkao
Calcite | Level 5

OK, Thank you. I'll try.

Rick_SAS
SAS Super FREQ

Just to clarify, I think the usual name for this plot is just "heat map," although some might call it a multiple time series plot or a lasagna plot. You can read about how to create a lasagna plot in SAS. The blog post includes reference to methods that use GTL or SAS/IML, both of which support creating this graph at SAS 9.4m1.

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
  • 10 replies
  • 864 views
  • 2 likes
  • 3 in conversation