I’m using seaborn’s kdeplot to draw the distribution of my data. I want to divide the shaded area under the line into three parts, showing the “high” percentile and the “low” percentile. It would be ideal if I can color the shaded area with three different colors. Any idea …
Tag: matplotlib
seaborn pointplot and boxplot in one plot but shifted on the x-axis
I want to plot both a boxplot and the mean in one figure. So far my plot looks like this using these lines of code: I would like to shift my mean ‘x’ markers a bit to the right so that the errorbars don’t overlap with the whiskers from the boxplot. Any idea how to do that? A bonus question:
How can I use matplotlib.pyplot in a docker container?
I have a certain setting of Python in an docker image named deep. I used to run python code For information, -v and -w options are to link a local file in the current path to the container. However, I can’t use matplotlib.pyplot. Let’s say test.py is I got this error. With solution search, I am ha…
Wrong labels when plotting a time series pandas dataframe with matplotlib
I am working with a dataframe containing data of 1 week. I create a new index by combining the weekday and time i.e. The plot of this data is the following: The plot is correct as the labels reflect the data in the dataframe. However, when zooming in, the labels do not seem correct as they no longer correspon…
plot multiple pandas dataframes in one graph
I have created 6 different dataframes that eliminate the outliers of their own original data frames. Now, I’m trying to plot all of the dataframes that eliminate the outliers on the same graph. This is my code that eliminates the outliers in each data frame: If I remove the comment newdf.plot() I will b…
AtributeError: ‘module’ object has no attribute ‘plt’ – Seaborn
I’m very new with these libraries and i’m having troubles while plotting this: And i’m getting this output: I’m running this in my Jupyter Notebook with Python 2.7.12. Any ideas? Answer sns.plt.show() works fine for me using seaborn 0.7.1. Could be that this is different in other versi…
Update patch edge colours in Geopandas plot
I’ve plotted a GeoDataFrame as a choropleth using the following code (geopandas 0.2.1, matplotlib 2.0.2, in a Jupyter notebook, using %inline: Which gives me a map with edges around the polygons: I’d like to remove these. So far, I’ve tried cycling through the patches, setting the edge colou…
How to change spacing between ticks
I want to plot a graph with a lot of ticks on the X axis using the following code: The resulting plot looks like this: As you can see, the X axis is a mess because the tick labels are plotted with too few space between them or even overlap. I would like to create constant space between each tick
Python and Matplotlib: characters as the x axis
Hi Stack Overflow community. I think I am trying to code the impossible with matplotlib, so if there is a different python library that will better suit me, please let me know! I have an entire amino acid sequence (Represented as capital letters in the image) of a protein (protein x). This will be my x axis. …
Python, Seaborn FacetGrid change titles
I am trying to create a FacetGrid in Seaborn My code is currently: This gives my the Figure Now, instead of “ActualExternal =0.0” and “ActualExternal =1.0” I would like the titles “Internal” and “External” And, instead of “ActualDepth” I would like t…