I want to have the y axis on the right hand side of my plot, but also have the label facing the correct direction. There's many answers that explain the first part, which can be done as follows:
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot()
ax.plot([1,2,3,4,5])
ax.set_ylabel("RHS")
ax.yaxis.set_label_position("right")
ax.yaxis.tick_right()
plt.show()
But the issue here is the yaxis label on the right hand side is facing outwards, and ideally I would like it to face inwards, something like the following:
Any help with this would be much appreciated!


