Which attribute is added to display whisker in horizontal direction in the boxplot?
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.
Related questions:
2026: 21 May Shift 1
2026: 21 May Shift 1