Attention geek! strengthen your structures with the Python Programming Foundation Course and learn the basics. To begin with, her interview preparations enhance your Data Structures ideas with the Python DS Course. And also to start with your an equipment Learning Journey, join the Machine finding out - an easy Level Course
The axhline() function in pyplot module the matplotlib library is supplied to add a horizontal line across the axis.
You are watching: How to plot horizontal line in matlab
Syntax: matplotlib.pyplot.axhline(y, color, xmin, xmax, linestyle)Parameters:y: place on Y axis come plot the line, the accepts integers.xmin and xmax: scalar, optional, default: 0/1. It plots the line in the provided rangecolor: shade for the line, that accepts a string. Eg ‘r’ or ‘b’ .linestyle: Specifies the kind of line, that accepts a string. Zb ‘-‘, ‘–‘, ‘-.’, ‘:’, ‘None’, ‘ ‘, ”, ‘solid’, ‘dashed’, ‘dashdot’, ‘dotted’
Plotting a solitary horizontal line
Plotting lot of horizontal linesTo plot many horizontal lines, use the axhline() method multiple times.
See more: Watch Jersey Shore Family Vacation Online Putlockers, Jersey Shore: Family Vacation Season 4 Episode 10
Adding the legendThe legend have the right to be added using the legend() function.
How to download PIP on windows ?Python math function | sqrt()Python regimen to examine if a cable is palindrome or notPython - means to remove duplicates native listPython routine to inspect whether a number is prime or not
Python string length | len()Stack in PythonCheck if element exists in perform in PythonDefaultdict in PythonPython | Get distinctive values from a list