Skip to main contentSkip to solution

Which of the follwoing is NOT a valid component of a plot?

Solution

✅ Correct Option: 2

plt.matplot is not a function in Matplotlib's pyplot module. The nearest real functions are plt.plot(), which draws the line, and plt.matshow(), which displays a matrix.

plt.title() sets the plot title, plt.xlabel() labels the x-axis and plt.ylabel() labels the y-axis, so these are all valid components.

plt is the usual alias from import matplotlib.pyplot as plt.

Keyboard Shortcuts

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