
python - Named colors in matplotlib - Stack Overflow
What named colors are available in matplotlib for use in plots? I can find a list on the matplotlib documentation that claims that these are the only names: b: blue g: green r: red c: cyan m: mag...
python - How to remove xticks from a plot - Stack Overflow
from matplotlib import pyplot as plt plt.xticks([]) This snippet might help in removing the xticks and yticks both.
python - How to install matplotlib - Stack Overflow
51 Matplotlib supports python 3.x as of version 1.2, released in January, 2013. To install it, have a look at the installation instructions. In general, call pip install matplotlib or use your preferred …
python - Plotting a 2D heatmap - Stack Overflow
Oct 16, 2022 · Using Matplotlib, I want to plot a 2D heat map. My data is an n-by-n Numpy array, each with a value between 0 and 1. So for the (i, j) element of this array, I want to plot a …
python - Adding a matplotlib legend - Stack Overflow
How can one create a legend for a line graph in Matplotlib's PyPlot without creating any extra variables? Please consider the graphing script below: if __name__ == '__main__': …
How to set a secondary y-axis in Python - Stack Overflow
Feb 16, 2016 · I'm currently trying to change the secondary y-axis values in a matplot graph to ymin = -1 and ymax = 2. I can't find anything on how to change the values though. I am using …
python - surface plots in matplotlib - Stack Overflow
I have a list of 3-tuples representing a set of points in 3D space. I want to plot a surface that covers all these points. The plot_surface function in the mplot3d package requires as …
python - multiple axis in matplotlib with different scales - Stack …
How can multiple scales can be implemented in Matplotlib? I am not talking about the primary and secondary axis plotted against the same x-axis, but something like many trends which have …
python - how to adjust x axis in matplotlib - Stack Overflow
Mar 31, 2017 · I have a graph like this The data on the x axis means hours, so I want the x axis to set as 0, 24, 48, 72.....instead of the value now, which is difficult to see the data between …
python - plot a circle with Matplotlib.pyplot - Stack Overflow
surprisingly I didn't find a straight-forward description on how to draw a circle with matplotlib.pyplot (please no pylab) taking as input center (x,y) and radius r. I tried some variants of this: