I want to change the fontsize of the lable on the y axis of a horizontal barplot (i.e. make the fontsize of "Question 1", "Question 2" bigger). I could not find the solution from the 
CodePudding user response:
Use plt.yticks:
import matplotlib.pyplot as plt
import numpy as np
x = np.array(["Question 1", "Question 2", "Question 3", "Question 4"])
y = np.array([3, 8, 1, 10])
plt.barh(x, y)
plt.yticks(fontsize=20)
plt.tight_layout()
plt.show()

