In plt.plot(x, y, 'r--'), what does the format string 'r--' specify?
Correct answer
D. A red dashed line
19 views
D. A red dashed line
19 views
Format strings combine colour, marker and line style: 'r' is red and '--' dashed. 'b:' would be a blue dotted line, and 'go' green circles.
Asked in: Data Science Interviews
Not sure why the answer is D? Ask here and get an explanation.