Skip to main contentSkip to solution

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.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question