The upset plot tutorials on the documentation have this example with movies: https://upsetplot.readthedocs.io/en/stable/formats.html#When-category-membership-is-indicated-in-DataFrame-columns
I wanted to know, after creating data from memberships "Genre" and plotting how do I list the names of the movies as well?
In the plot, I want to print the list of movies at each intersection. So at intersection 48, I want to list the 48 movies.

Upset plot python list row names
721 views Asked by Uqhah At
1
There are 1 answers
Related Questions in PYTHON
- How to store a date/time in sqlite (or something similar to a date)
- Instagrapi recently showing HTTPError and UnknownError
- How to Retrieve Data from an MySQL Database and Display it in a GUI?
- How to create a regular expression to partition a string that terminates in either ": 45" or ",", without the ": "
- Python Geopandas unable to convert latitude longitude to points
- Influence of Unused FFN on Model Accuracy in PyTorch
- Seeking Python Libraries for Removing Extraneous Characters and Spaces in Text
- Writes to child subprocess.Popen.stdin don't work from within process group?
- Conda has two different python binarys (python and python3) with the same version for a single environment. Why?
- Problem with add new attribute in table with BOTO3 on python
- Can't install packages in python conda environment
- Setting diagonal of a matrix to zero
- List of numbers converted to list of strings to iterate over it. But receiving TypeError messages
- Basic Python Question: Shortening If Statements
- Python and regex, can't understand why some words are left out of the match
Related Questions in UPSETPLOT
- How to set y-axis title and change the font style in UpsetR plot?
- How to customize an upset graph with stacked bars (size, legend, combo order)
- Changing the y-axis scale for intersection_size from ComplexUpset package
- Removing Isolated Variables in UpSetR Plot
- Colouring of the main bars in upset plot
- How to sort the combination matrix of an UpSet plot by sets
- How to display intersection values instead of distinct values in Upset plot
- UpsetR How to fix: Image being cut off when trying to export
- Add labels to upset plot, so the values of intersection would be visible along the number of intersection
- Upset plot python list row names
- Rotate annotation in Upset plot of complex heatmap package
- Error in start_col:end_col : argument of length 0 - UpSetR
- How can I add a title and change other plot aesthetics for an UpSet plot in python?
- How to change the labelling of the intersection size and set size?
- Subsetting columns and counting the 1's (TURF analysis?)
Related Questions in COMPLEX-UPSET
- How to set y-axis title and change the font style in UpsetR plot?
- `arrange_venn()` fails to find a grid
- Changing the y-axis scale for intersection_size from ComplexUpset package
- Upset plot python list row names
- Determination of the intersection size members in ComplexUpset by using R
- How to change the labelling of the intersection size and set size?
- How to make the Set size sidebars in Complex Upset the total number of items and the single "intersection" top bar the items only in that set?
- Change the size of the y axis in the matrix of. Complex Upset Plot R
- How to change labels in the Intersection Matrix in Complex Upset R?
- ComplexUpset R. How to add an annotation that uses another set of related data on a upset plot?
- Error in upset_data : unused argument (nsets = 5) What could be causing this and how coul I fix the issue?
- Complex Upset in R: Sort ascending by degree and descending within degree groups?
- How to to assign logarithmic scale to “Intersection size” using ComplexUpset library?
- Memory management in R ComplexUpset Package
- Manual coloring of dots by set color in Complex Upset
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
In the example on the documentation page, this information is contained in the dataframe
movies_by_genre, which is defined as:movies_by_genre = from_indicators(genre_indicators, data=movies). Now, we can extract the required information from this data frame. We just need to make sure that the order of the boolean tuple of length 20, (True, False, ....., True) in the pandas Series objectintersectionand the pandas Series objectmovies_by_genre.Genres. I used a dict to map the order of columns. For reproducibility, the end-to-end python script is given below:Output:
EDIT:
Upon clarification from OP, the list of names should be printed on the plot. So, we can follow the same method and put the text on the plots manually. I did the following:
_plot_bars()function insideupsetplot.plotting.pysuch that it allows us to add text from a parameterlist calledlol_of_intersection_names;lolstands for list of list. Additionally, I added analphaparameter to reduce the transparency of the bars whenax.baris called; otherwise the text will not be visible. (alpha = 0.5) in the example below.uof classUpsetso that it can be accessed inside the function_plot_bars()as shown below:Finally, the output looks as shown below:
However, given the long list of names, I am unsure of the practical importance of plotting like this. Only when I save the image in 600DPI, can I zoom in and see the names of movies.