Which function is used to set a label for the x-axis in pyplot?

15. Which function is used to set a label for the x-axis in pyplot?

  1. xlabel()
  2. set_x()
  3. x-axis()
  4. xaxi()

Answer: A) xlabel()

Explanation:

The xlabel() function is used to set a label for the x-axis. Consider the below code statement to set the x-axis.

plt.xlabel("Average Salary")

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.