Top "Matplotlib" questions

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

How to set xlim and ylim for a subplot in matplotlib

I would like to limit the X and Y axis in matplotlib for a specific subplot. The subplot figure itself …

python matplotlib plot
How to add title to subplots in Matplotlib?

I have one figure which contains many subplots. fig = plt.figure(num=None, figsize=(26, 12), dpi=80, facecolor='w', edgecolor='k') fig.…

python matplotlib plot subtitle
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 …

python matplotlib
Display an image with Python

I tried to use IPython.display with the following code: from IPython.display import display, Image display(Image(filename='MyImage.…

python matplotlib ipython
Display image as grayscale using matplotlib

I'm trying to display a grayscale image using matplotlib.pyplot.imshow(). My problem is that the grayscale image is displayed …

python matplotlib grayscale
Set Colorbar Range in matplotlib

I have the following code: import matplotlib.pyplot as plt cdict = { 'red' : ( (0.0, 0.25, .25), (0.02, .59, .59), (1., 1., 1.)), 'green': ( (0.0, 0.0, 0.0), (0.02, .45, .45), (1., .97, .97)), 'blue' : ( (0.0, 1.0, 1.0), (0.02, .75, .75), (1., 0.45, 0.45)) } cm = m.colors.LinearSegmentedColormap('my_colormap', …

python matplotlib graph colorbar colormap
Named colors in matplotlib

What named colors are available in matplotlib for use in plots? I can find a list on the matplotlib documentation …

python matplotlib colors
Remove xticks in a matplotlib plot?

I have a semilogx plot and I would like to remove the xticks. I tried: plt.gca().set_xticks([]) plt.…

python matplotlib plot
How to update a plot in matplotlib?

I'm having issues with redrawing the figure here. I allow the user to specify the units in the time scale (…

python matplotlib tkinter
Plotting time in Python with Matplotlib

I have an array of timestamps in the format (HH:MM:SS.mmmmmm) and another array of floating point numbers, …

python graph plot matplotlib