Data visualization with SAS programming

Data Tips in GSLIDE with annotate - can it be done?

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 5
Accepted Solution

Data Tips in GSLIDE with annotate - can it be done?

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


Accepted Solutions
Solution
‎10-03-2016 04:46 PM
SAS Super FREQ
Posts: 939

Re: Data Tips in GSLIDE with annotate - can it be done?

Posted in reply to Chiron77omus

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


All Replies
Solution
‎10-03-2016 04:46 PM
SAS Super FREQ
Posts: 939

Re: Data Tips in GSLIDE with annotate - can it be done?

Posted in reply to Chiron77omus

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 

Occasional Contributor
Posts: 5

Re: Data Tips in GSLIDE with annotate - can it be done?

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 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 236 views
  • 0 likes
  • 2 in conversation