Skip to main contentSkip to solution

Which of the following is NOT a valid graph function of matplotlib library?

Solution

✅ Correct Option: 4

matplotlib has no function called barv(). Vertical bar charts are drawn with bar(), and horizontal ones with barh().


Option 1: barh() is valid and draws horizontal bars.

Options 2 and 3: boxplot() draws box-and-whisker plots and scatter() draws scatter plots, so both are valid.

Function names in matplotlib are written in lowercase.

Keyboard Shortcuts

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