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
718 Views Asked by Uqhah At
1
There are 1 best solutions below
Related Questions in PYTHON
- new thread blocks main thread
- Extracting viewCount & SubscriberCount from YouTube API V3 for a given channel, where channelID does not equal userID
- Display images on Django Template Site
- Difference between list() and dict() with generators
- How can I serialize a numpy array while preserving matrix dimensions?
- Protractor did not run properly when using browser.wait, msg: "Wait timed out after XXXms"
- Why is my program adding int as string (4+7 = 47)?
- store numpy array in mysql
- how to omit the less frequent words from a dictionary in python?
- Update a text file with ( new words+ \n ) after the words is appended into a list
- python how to write list of lists to file
- Removing URL features from tokens in NLTK
- Optimizing for Social Leaderboards
- Python : Get size of string in bytes
- What is the code of the sorted function?
Related Questions in UPSETPLOT
- Changing the y-axis scale for intersection_size from ComplexUpset package
- How to customize an upset graph with stacked bars (size, legend, combo order)
- How to to assign logarithmic scale to “Intersection size” using ComplexUpset library?
- Subsetting columns and counting the 1's (TURF analysis?)
- How to change the labelling of the intersection size and set size?
- How can I add a title and change other plot aesthetics for an UpSet plot in python?
- UpSetPlot from actual sets
- ComplexUpset R. How to add an annotation that uses another set of related data on a upset plot?
- How to change labels in the Intersection Matrix in Complex Upset R?
- Change the size of the y axis in the matrix of. Complex Upset Plot R
- 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?
- How to show all sets in ggupset?
- Obtaining a HashMap or dictionary and a diagram in Python to visualize the overlaps between multiple lists
- How to use upsetplot python for finding intersection in pandas dataframe
- Colouring of the main bars in upset plot
Related Questions in COMPLEX-UPSET
- Changing the y-axis scale for intersection_size from ComplexUpset package
- individualizing the UpSetR or ComplexUpset (combining the intersections + queries + keep.order + group.by)
- How to to assign logarithmic scale to “Intersection size” using ComplexUpset library?
- How to change the labelling of the intersection size and set size?
- ComplexUpset R. How to add an annotation that uses another set of related data on a upset plot?
- How to change labels in the Intersection Matrix in Complex Upset R?
- Change the size of the y axis in the matrix of. Complex Upset Plot R
- 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?
- Manual coloring of dots by set color in Complex Upset
- Determination of the intersection size members in ComplexUpset by using R
- ComplexUpset: How can I plot ONLY specific intersections?
- Complex Upset in R: Sort ascending by degree and descending within degree groups?
- Error in upset_data : unused argument (nsets = 5) What could be causing this and how coul I fix the issue?
- `arrange_venn()` fails to find a grid
- How to set y-axis title and change the font style in UpsetR plot?
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)
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?
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.