Home »
Python »
Matplotlib MCQs
Which function is used to set a label for the y-axis in the pyplot?
16. Which function is used to set a label for the y-axis in the pyplot?
- ylabel()
- set_y()
- y-axis()
- yaxis()
Answer: A) ylabel()
Explanation:
The ylabel() function is used to set a label for the y-axis. Consider the below code statement to set the y-axis.
plt.ylabel("Year")