A

Admin • 833.24K Points
Coach

Q. How do you enable a grid only on y-axis?

  • (A) plt.grid(axis='y')
  • (B) plt.grid(y=True)
  • (C) plt.grid(only='y')
  • (D) plt.ygrid()
  • Correct Answer - Option(A)
  • Views: 28
  • Filed under category Matplot Lib
  • Hashtags:

Explanation by: Admin

Use `axis='y'` in `plt.grid()` to show grid lines on the y-axis only.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.