How to place the y-axis on the right side of the plot in Matplotlib in Python

The y-axis, which consists of ticks and tick labels, is on the left side of the plot by default, but can be moved to the right side of the plot.

Solution for How to place the y-axis on the right side of the plot in Matplotlib in Python : You can use matplotlib.axis.yaxis.set_ticks_position() to place the y-axis on the right {set-ticks-position}Call Axes.YAxis.set_ticks_position(position) with position set to “right”, where Axes is a matplotlib.axes.Axes object to place the y-axis on the right side of the plot.


how-to-place-the-y-axis-on-the-right-side-of-the-plot-in-matplotlib-in-python