Add Matplotlib Percentage Ticks to a Histogram

Matplotlib provides an easy way of converting your yaxis to percentages. It's just a one liner import matplotlib.ticker as ticker ax.yaxis.set_major_formatter(ticker.PercentFormatter(xmax)) But the issue is you can't space the yticks as you want them to be. Usually you can do this by setting yticks (ax.set_yticks). But the issue is, python converts the axis directly to … Continue reading Add Matplotlib Percentage Ticks to a Histogram