Which parameter of the box plot displays the whisker in horizontal direction?
Which parameter of the box plot displays the whisker in horizontal direction?
Solution
✅ Correct Option: 3
In Matplotlib, plt.boxplot() has a parameter vert that controls the orientation. By default vert = True, which draws vertical boxes with vertical whiskers. Setting vert = False draws the box plot horizontally, so the whiskers also run horizontally.
Option 1: direction is not a parameter of boxplot().
Option 4: vert = True is the default, so it gives a vertical box plot.
In newer Matplotlib versions, orientation = 'horizontal' is also introduced, but the CUET syllabus uses vert.
Related questions:
2025: 27 May Shift 2
2025: 13 May Shift 2
2026: 20 May Shift 1