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
700 Views Asked by Uqhah At
1
There are 1 best solutions below
Related Questions in PYTHON
- .htaccess redirect 403 error files to 404 error document
- Users are able to access a protected page using the direct link. How do I create a redirect?
- How to redirect an incoming request to specific serverName to different server in apache2?
- .htaccess file making new domain redirect to my original domain
- Redirecting console output in python
- htaccess www to non-www for subfolders
- htaccess redirect url with multiple folder
- How to wait until page redirected using httpwebrequest VB.Net
- The page isn't redirecting properly when I logout
- How to redirect to different domain in Slim framework of PHP?
Related Questions in UPSETPLOT
- .htaccess redirect 403 error files to 404 error document
- Users are able to access a protected page using the direct link. How do I create a redirect?
- How to redirect an incoming request to specific serverName to different server in apache2?
- .htaccess file making new domain redirect to my original domain
- Redirecting console output in python
- htaccess www to non-www for subfolders
- htaccess redirect url with multiple folder
- How to wait until page redirected using httpwebrequest VB.Net
- The page isn't redirecting properly when I logout
- How to redirect to different domain in Slim framework of PHP?
Related Questions in COMPLEX-UPSET
- .htaccess redirect 403 error files to 404 error document
- Users are able to access a protected page using the direct link. How do I create a redirect?
- How to redirect an incoming request to specific serverName to different server in apache2?
- .htaccess file making new domain redirect to my original domain
- Redirecting console output in python
- htaccess www to non-www for subfolders
- htaccess redirect url with multiple folder
- How to wait until page redirected using httpwebrequest VB.Net
- The page isn't redirecting properly when I logout
- How to redirect to different domain in Slim framework of PHP?
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 # Hahtags
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 objectintersection
and 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.py
such that it allows us to add text from a parameterlist calledlol_of_intersection_names
;lol
stands for list of list. Additionally, I added analpha
parameter to reduce the transparency of the bars whenax.bar
is called; otherwise the text will not be visible. (alpha = 0.5) in the example below.u
of classUpset
so 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.