About 2,480,000 results
Open links in new tab
  1. Save plot to image file instead of displaying it - Stack Overflow

    This displays the figure in a GUI: import matplotlib.pyplot as plt plt.plot([1, 2, 3], [1, 4, 9]) plt.show() But how do I instead save the figure to a file (e.g. foo.png)?

  2. How to put the legend outside the plot - Stack Overflow

    seaborn is a high-level api for matplotlib. From seaborn v0.11.2, there is sns.move_legend as shown at Move seaborn plot legend to a different position. All of the parameters for .legend can be passed to …

  3. How do I plot in real-time in a while loop? - Stack Overflow

    I am trying to plot some data from a camera in real time using OpenCV. However, the real-time plotting (using matplotlib) doesn't seem to be working. I've isolated the problem into this simple exa...

  4. python - How to plot in multiple subplots - Stack Overflow

    Create an array of Axes with matplotlib.pyplot.subplots and then pass axes[i, j] or axes[n] to the ax parameter. This option uses pandas.DataFrame.plot, but can use other axes level plot calls as a …

  5. python - How to update a plot in matplotlib - Stack Overflow

    Based on the other answers, I wrapped the figure's update in a python decorator to separate the plot's update mechanism from the actual plot. This way, it is much easier to update any plot.

  6. python - pyplot scatter plot marker size - Stack Overflow

    For a more concrete example, in the following figure, the same marker size (s=36) was passed to seaborn, matplotlib and pandas scatter-plot plotters but because the default edge color and marker …

  7. How do I change the size of figures drawn with Matplotlib?

    A point is the unit of matplotlib element size (linewidth, markersize, fontsize etc.). For example, a line with lw=1 is 1/72 inch wide, a letter with fontsize=10 is 10/72 inch tall etc.

  8. How to change the font size on a matplotlib plot - Stack Overflow

    How does one change the font size for all elements (ticks, labels, title) on a matplotlib plot? I know how to change the tick label sizes, this is done with: import matplotlib matplotlib.rc('xti...

  9. How to plot a single point in matplotlib - Stack Overflow

    31 matplotlib.pyplot.plot and matplotlib.axes.Axes.plot plots y versus x as lines and/or markers. ax.plot(105, 200) attempts to draw a line, but two points are required for a line plt.plot([105, 110], …

  10. python - How to plot multiple bars grouped - Stack Overflow

    How to plot multiple bars in matplotlib, when I tried to call the bar function multiple times, they overlap and as seen the below figure the highest value red can be seen only. How can I plot the