Question:

Which of the following is correct code to plot line Chart with dotted linestyle ?

Updated On: Sep 23, 2024
  • plt.plot(x, y)
    plt.linestyle = “dotted”
    plt.show()
  • plt.plot(x, y)
    plt.linestyle | “dotted” )
    plt.show()
  • plt.plot(x, y), linestyle - dotted)
    plt.show()
  • plt.plot(x, y, linestyle = “dotted”)
    plt.show()
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation

The correct option is (D) :plt.plot(x, y, linestyle = “dotted”)
plt.show().
Was this answer helpful?
0
0