In matplotlib, the line chart can take which of the following options as line style?
(A) soliddashed
(B) dashed
(C) dotted
(D) solid
(E) dashdot
In matplotlib, the line chart can take which of the following options as line style?
(A) soliddashed
(B) dashed
(C) dotted
(D) solid
(E) dashdot
Solution
✅ Correct Option: 1
Matplotlib's linestyle argument accepts four named styles: solid ('-'), dashed ('--'), dashdot ('-.') and dotted (':'). These are options (D), (B), (E) and (C).
Option (A), "soliddashed", is not a valid style name, so any option containing it is wrong.
Option 3 leaves out dashdot, which is a valid style.
Related questions:
2025: 16 May Shift 1
2026: 13 May Shift 2
2026: 29 May Shift 2
2026: 23 May Shift 1