Top "Matplotlib" questions

Matplotlib is a plotting library for Python which may be used interactively or embedded in stand-alone GUIs.

Linear regression with matplotlib / numpy

I'm trying to generate a linear regression on a scatter plot I have generated, however my data is in list …

python numpy matplotlib linear-regression curve-fitting
How to save a Seaborn plot into a file

I tried the following code (test_seaborn.py): import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt matplotlib.style.…

python pandas matplotlib seaborn
How to convert a NumPy array to PIL image applying matplotlib colormap

I have a simple problem, but I cannot find a good solution to it. I want to take a NumPy 2…

python numpy matplotlib python-imaging-library color-mapping
matplotlib: how to draw a rectangle on image

How to draw a rectangle on an image, like this: import matplotlib.pyplot as plt from PIL import Image import …

python image matplotlib
How to do a scatter plot with empty circles in Python?

In Python, with Matplotlib, how can a scatter plot with empty circles be plotted? The goal is to draw empty …

python matplotlib geometry scatter-plot scatter
Reduce left and right margins in matplotlib plot

I'm struggling to deal with my plot margins in matplotlib. I've used the code below to produce my chart: plt.…

python matplotlib
Matplotlib scatterplot; colour as a function of a third variable

I want to make a scatterplot (using matplotlib) where the points are shaded according to a third variable. I've got …

python matplotlib plot scatter
Secondary axis with twinx(): how to add to legend?

I have a plot with two y-axes, using twinx(). I also give labels to the lines, and want to show …

python matplotlib axis legend
matplotlib savefig() plots different from show()

When I use show() to plot the graphs in X, the graphs looks very good. However when I start to …

python graph plot matplotlib
How to set a single, main title above all the subplots with Pyplot?

I am using pyplot. I have 4 subplots. How to set a single, main title above all the subplots? title() sets …

python matplotlib