About 50 results
Open links in new tab
  1. 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, …

  2. python - How to draw a line with matplotlib? - Stack Overflow

    Apr 7, 2016 · I cannot find a way to draw an arbitrary line with matplotlib Python library. It allows to draw horizontal and vertical lines (with matplotlib.pyplot.axhline and …

  3. 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:

  4. python - matplotlib Axes.plot () vs pyplot.plot () - Stack Overflow

    Apr 19, 2017 · python plt.plot(): it will create many default subplot s, will save many lines of code and is easy to understand. Axes.plot(): using an axes object will give you a better ability to …

  5. 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.

  6. Adding caption below X-axis for a scatter plot using matplotlib

    Dec 1, 2015 · I am pretty new to python and to the matplotlib library. I have created a scatter plot using matplotlib and now I wish to add caption a little below the X-axis. This is my code: from …

  7. How to add hovering annotations to a plot - Stack Overflow

    I am using matplotlib to make scatter plots. Each point on the scatter plot is associated with a named object. I would like to be able to see the name of an object when I hover my cursor …

  8. 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.

  9. 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)?

  10. VSCODE: jupyter adding interactive matplotlib plot %matplotlib …

    Mar 10, 2022 · The following example doesn't work in VSCODE. It works (with %matplotlib notebook in a Jupyter notebook in a web browser though). # creating 3d plot using matplotlib # …