We can display the whisker in a box plot, in the horizontal direction by adding a parameter _________ .
We can display the whisker in a box plot, in the horizontal direction by adding a parameter _________ .
Solution
✅ Correct Option: 2
In Matplotlib, the vert parameter of boxplot() controls the orientation of the box plot. By default it is True, which draws vertical boxes. Setting vert=False draws the boxes and whiskers horizontally.
Example: plt.boxplot(data, vert=False)
Option 1: vert=True is the default, so it gives the usual vertical plot.
Options 3 and 4: vert accepts only a boolean value, so Axis and Horizontal are not valid.
Related questions:
2025: 3 June Shift 2
2026: 21 May Shift 1
2025: 27 May Shift 2
2026: 29 May Shift 2