BookmarkSubscribeRSS Feed
ikeplus
Fluorite | Level 6

Found and test an interesting Python library for generating alt text descriptions for plots made with Matplotlib.

 

The Library is Matplotalt https://matplotalt.readthedocs.io/en/latest/ 

 

Wondering if there is something similar for  SAS/GRAPH

 

Example using the heuristic method (no AI involved) download.png

 

the generated ALT text is: A bar chart titled 'world's biggest coffee drinkers (per capita)'. Average consumption (kg) is plotted on the x-axis from 0 to 14 using a linear scale and country is plotted on the y-axis from netherlands to finland using a categorical scale. (and the datatable in text, I am not posting here because format got damaged but providing screenshot)

Screenshot 2026-02-11 173330.png

 

I have a google colab with this example. if you want to read the python code. 

https://colab.research.google.com/drive/1gG5rcLR8xcpHzFrpIRP92d0zEtfSjpFu?usp=sharing

 

 

4 REPLIES 4
Quentin
Super User

@Ksharp the links your posted explain how to generate colorful graphs, but the question here is is there a way to automatically generate the ALT text that summarizes a graph (that would be displayed on hover, or for visually-impaired viewers with screen readers).   

 

That's a pretty cool feature.  I know SAS has done a lot of work on graphics accessibility, including translating graphs into audio representations: https://www.perkins.org/resource/sas-enables-visually-impaired-visualize-data/  .  But I don't recall seeing anything that would automatically generate an alt-text summary of a graph.  

The Boston Area SAS Users Group is hosting free webinars!

Register now at https://www.basug.org/events.
ikeplus
Fluorite | Level 6

Thank you @Quentin , I will continue my search, for now my only possible solution is to upload via API the generated image file to an AI to get described the generated image with a WCGA compliant alt description. I will read more about SAS® Graphics Accelerator. have a beautiful day!

Quentin
Super User

Assuming you don't find a SAS solution, you might suggest this as a product enhancement:

https://communities.sas.com/t5/SAS-Product-Suggestions/idb-p/product-suggestions

 

The LLM approach makes sense.  I haven't tried SAS Viya Copilot, but I wonder if SAS could adapt it to generate alt-text from graph images (or I guess from the data used to generate the graph).

 

The Boston Area SAS Users Group is hosting free webinars!

Register now at https://www.basug.org/events.

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand in the Innovate Hub.

Watch 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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 504 views
  • 2 likes
  • 3 in conversation