About 50 results
Open links in new tab
  1. python - Plot a horizontal line on a given plot - Stack Overflow

    Oct 28, 2015 · Use matplotlib.pyplot.hlines: These methods are applicable to plots generated with seaborn and pandas.DataFrame.plot, which both use matplotlib. Plot multiple horizontal lines by …

  2. vertical & horizontal lines in matplotlib - Stack Overflow

    34 This may be a common problem for new users of Matplotlib to draw vertical and horizontal lines. In order to understand this problem, you should be aware that different coordinate systems exist in …

  3. matplotlib - Plotting a horizontal line on multiple subplots in python ...

    I am plotting three subplots on the same page. I want to draw a horiZontal line through all the subplots. Following is my code and the resultant graph: (You can notice I can get the horizontal line...

  4. Add a label to y-axis to show the value of y for a horizontal line in ...

    Mar 18, 2017 · How can I add a string label to the horizontal red line showed in the following plot? I want to add something like "k=305" to the y-axis label next to the line. The blue dots are just some other da...

  5. How do I make a dashed horizontal line with matplotlib?

    Mar 2, 2021 · 7 I want just a horizontal dashed line. If I was using pyplot.plot() I would add the argument '-' but I'm using axes.Axes.axhline() and it doesn't seem to recognize that as an argument, and I can't …

  6. Plotting a horizontal line, y = constant in matplotlib

    Sep 21, 2014 · Plotting a horizontal line, y = constant in matplotlib Asked 11 years, 5 months ago Modified 11 years, 5 months ago Viewed 9k times

  7. matplotlib - python plot horizontal line for a range of values - Stack ...

    python plot horizontal line for a range of values Asked 10 years, 9 months ago Modified 10 years, 9 months ago Viewed 4k times

  8. 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 matplotlib.pyplot.axvline, for exa...

  9. Matplotlib plot only horizontal lines in step plot

    Jul 7, 2017 · This answer corresponds to the drawstyle='steps-post' keyword argument in plt.plot() for drawing step graphs i.e. the y-value of the flat line at any given x-value is equal to the y-value at the …

  10. matplotlib.pyplot: add horizontal line to sub-plot [duplicate]

    6 You can use matplotlib.axes.Axes.axhline of matplotlib which adds a horizontal line across the axis. If you need to set any further parameters, refer to the official documentation