What is the output of plt.plot([1, 2, 3], [4, 5, 6], linestyle='--')?
Correct answer
A. A line plot with dashed lines
13 views
A. A line plot with dashed lines
13 views
It draws a line plot with dashed lines through the points (1,4), (2,5) and (3,6). linestyle='--' selects dashes.
Other styles are '-' solid, ':' dotted and '-.' dash-dot.
For more solved questions like this one, see Data Science MCQs on MCQsExam.com.
Not sure why the answer is A? Ask here and get an explanation.