I have a histogram which has scientific notation of values along Y axis:
The Channel B histogram has decimals along the Y axis. I want these numbers to be integers. I tried this solution, but once set_major_formatter
is applied, the scientific notation is ruined, and then I cannot get it back since pyplot.ticklabel_format(axis = 'y', style = 'sci')
raises AttributeError: This method only works with the ScalarFormatter
. How can I prevent scientific notation from having decimals?