Which is used for plotting a horizontal line?

34. Which is used for plotting a horizontal line?

  1. hline()
  2. ahline()
  3. xhline()
  4. axhline()

Answer: D) axhline()

Explanation:

For plotting a horizontal line, you can simply use the axhline() function.

Syntax:
matplotlib.pyplot.axhline(y, color, xmin, xmax, linestyle)

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.