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

About 10-12 years ago I wrote SAS code to generate a heat map of presence (Black) or absence (Red) of genetic characteristics for several hundred isolates of E. coli - see below for an example - this is done using Proc GSLIDE with an annotate data set in SAS 9.4 now.  Essentially all of the coordinate information is stored in the annotate data set and presented using the 'blank page' of GSLIDE.

 NM_HF_182_8R.gif

 

In the past year or so I have used this technique for a variety of consulting projects where heat maps are useful in communicating a large amount of data in a concise image.  It would be nice to be able to add a data tip to such an image so that one could mouse over a character in the display matrix and have it list the isolate ID and characteristic, for example.  I understand this can be done with some of the SAS/Graph Procs using the HTML= option, but this does not appear to be available in GSLIDE.

 

My question is whether or not data tips can be accomplished with GSLIDE and annotate or if I must convert my code to either the heat map capability in SGPLOT or use GTL to try to recreate the images I have in GSLIDE.  Any suggestions are appreciated .

 

Thanks.

 

Curt

1 ACCEPTED SOLUTION

Accepted Solutions
DanH_sas
SAS Super FREQ

Have you tried using the HTMLvariable support in the annotate data set?  You should be able to define HTML string using ALT or TITLE option in your annotate data set to get tooltips. Give it a try and let me know if it works for you.

 

Hope this helps!

Dan 

View solution in original post

2 REPLIES 2
DanH_sas
SAS Super FREQ

Have you tried using the HTMLvariable support in the annotate data set?  You should be able to define HTML string using ALT or TITLE option in your annotate data set to get tooltips. Give it a try and let me know if it works for you.

 

Hope this helps!

Dan 

Chiron77omus
Fluorite | Level 6

Thanks, Dan, for this pointer.  After a few attempts I have managed to get the data tips to show up using the html output destination for a relatively small heat map (about 600 cells).  It appears the default number of data tips is set to 500 but this can be overridden with tipmax in an ODS graphics statement.

 

My actual project has about 120,000 cells and although SAS seemed to generate the html file just fine, my browser didn't seem to want to load it ... fortunately I was distracted and left it 'spin' for a while and after about 12 minutes Chrome finally brought the image up (the file is about 15M in size) and the data tips worked as hoped.  

 

In summary the HTML variable in an annotate data set used with GSLIDE does the trick.  I had tried searches before I posted my question but apparently did not manage the right sequence of terms as this solution did not occur so I am very appreciative of your quick and accurate response.

 

Curt 

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
  • 2 replies
  • 814 views
  • 0 likes
  • 2 in conversation