Skip to main contentSkip to solution

Which attribute is added to display whisker in horizontal direction in the boxplot?

Solution

✅ Correct Option: 3

In Matplotlib's boxplot(), the vert parameter sets the orientation. Passing vert=False draws the boxes and whiskers horizontally.


Options 1 and 4: vert=True is the default, and vert=1 is also truthy, so both give a vertical boxplot.

Option 2: "H" is not a valid value for vert. It is a non-empty string, which counts as truthy, so it does not give a horizontal plot.

Keyboard Shortcuts

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