Top "Matplotlib" questions

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

In Matplotlib, what does the argument mean in fig.add_subplot(111)?

Sometimes I come across code such as this: import matplotlib.pyplot as plt x = [1, 2, 3, 4, 5] y = [1, 4, 9, 16, 25] fig = plt.figure() fig.add_…

python matplotlib figure
Set markers for individual points on a line in Matplotlib

I have used Matplotlib to plot lines on a figure. Now I would now like to set the style, specifically …

python matplotlib
Reverse Y-Axis in PyPlot

I have a scatter plot graph with a bunch of random x, y coordinates. Currently the Y-Axis starts at 0 and …

python matplotlib
Add x and y labels to a pandas plot

Suppose I have the following code that plots something very simple using pandas: import pandas as pd values = [[1, 2], [2, 5]] df2 = pd.…

python pandas dataframe matplotlib
Matplotlib different size subplots

I need to add two subplots to a figure. One subplot needs to be about three times as wide as …

python plot matplotlib figure
How do I get multiple subplots in matplotlib?

I am a little confused about how this code works: fig, axes = plt.subplots(nrows=2, ncols=2) plt.show() How does …

python matplotlib subplot
Adding an arbitrary line to a matplotlib plot in ipython notebook

I'm rather new to both python/matplotlib and using it through the ipython notebook. I'm trying to add some annotation …

matplotlib ipython
How to plot two columns of a pandas data frame using points?

I have a pandas data frame and would like to plot values from one column versus the values from another …

python matplotlib plot pandas dataframe
Why is my xlabel cut off in my matplotlib plot?

I am plotting a dataset using matplotlib where I have an xlabel that is quite "tall" (it's a formula rendered …

python matplotlib
Python matplotlib multiple bars

How to plot multiple bars in matplotlib, when I tried to call the bar function multiple times, they overlap and …

python matplotlib