Skip to main contentSkip to solution

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.

Keyboard Shortcuts

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