Add Text Description Generation via upset-altxt #294
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the ability to generate semantically useful text descriptions via the python package upset-alttxt developed by the Visualization Design Lab at the University of Utah.
This text description generation is part of a 2025 paper, Accessible Text Descriptions for UpSet Plots.
Generating alt-text in practice
To generate the alt-text (text description), simply add the
gen_grammar
boolean flag when initializing the plot. This will populate a grammar for use in the alttxt package. After the plot is initialized, use theget_alt_text()
function to fetch the text description for a given plot.Additionally, a
meta_data
flag has been generated which can be used to add contextual information which is usable in the alttxt package or anywhere else it is relevant in the plotting side of things. For example, a user could specifymeta_data={"items": "movies"}
for a dataset in which each individual item is a movie.The fetched text description has a
short_description
,long_description
, andtechnique_description
.An example can be found at
examples/plot_alt_text.py
. Additionally, a jupyter notebook file showcasing the feature is available as a part of the supplementary material for the paper above.Note for reviewer/maintainer: On my fork/branch, I consistently have been getting github workflow failures which I do not believe are related to my contributions. Since it seems outside of the scope of the PR, I have abstained from making any changes to these workflows. I am happy to take a look if you deem it necessary however.