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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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