seaborn
Nested bar plots with three y axis using seaborn package
Using the python seaborn package I was trying to plot the nested bar graphs with three different y-axes as shown in the below figure:
python reader graph gives a blank canvass
Mtcars is a public dataset in R. I’m not sure it’s a public dataset in python. mtcars <- mtcars I created this boxplot in R and part of what I’m doing is reordering the y-axis with the reorder() function. ggplot(mtcars, aes(x = mpg, y = reorder(origin, mpg), color = origin)) + geom_boxplot() + theme(legend.position = … Read more
mplcursors with seaborn and multiple dataframes
I am trying to use mplcursors when plotting data from multiple pandas DataFrames (or from multiple subsets of a single DataFrame).
I have read the answers of this question and this one, as well as this one, which is somewhat redundent with the first one.
I am able to adapt the code of the documentation on Extracting data and labels from a DataFrame to using seaborn with a single DataFrame, i.e. the following works fine:
How to plot in multiple subplots
I am a little confused about how this code works:
How to add hovering annotations in matplotlib
I am using matplotlib to make scatter plots. Each point on the scatter plot is associated with a named object. I would like to be able to see the name of an object when I hover my cursor over the point on the scatter plot associated with that object. In particular, it would be nice to be able to quickly see the names of the points that are outliers. The closest thing I have been able to find while searching here is the annotate command, but that appears to create a fixed label on the plot. Unfortunately, with the number of points that I have, the scatter plot would be unreadable if I labeled each point. Does anyone know of a way to create labels that only appear when the cursor hovers in the vicinity of that point?
matplotlib/seaborn: first and last row cut in half of heatmap plot
When plotting heatmaps with seaborn (and correlation matrices with matplotlib) the first and the last row is cut in halve.
This happens also when I run this minimal code example which I found online.
Improve subplot size/spacing with many subplots in matplotlib
Very similar to this question but with the difference that my figure can be as large as it needs to be.
Stacked Bar Chart with Centered Labels
I’m trying to “robustly” center the data labels in a stacked bar chart. A simple code example and the result are given below. As you can see, the data labels aren’t really centered in all rectangles. What am I missing?
How to have clusters of stacked bars with python (Pandas)
So here is how my data set looks like :