0

So I'm plotting a normal plot with the values of the y-axis going from 0.701 to 0.708 and for some reason matplotlib decides to take the common factor of 0.7 out. I haven't put it anywhere in that the code should do this and I would like to display it normally, so what's happening? I even specified the values of the y-axis with plt.ylim(0.701, 0.708) but it's no good. Apart from this my code has:

ax.xaxis.set_minor_locator(MultipleLocator(20))
ax.yaxis.set_minor_locator(MultipleLocator(0.0002))
ax.tick_params(which='major', length=10, width=1.3)
ax.tick_params(which='minor', length=6)

and I'm using the classic style with these features:

plt.style.use('classic')
plt.rcParams['figure.figsize'] = (11, 6.5)
plt.rcParams['xtick.labelsize']=12
plt.rcParams['ytick.labelsize']=12
plt.rcParams['font.size']=22
plt.rcParams['font.family']='sans-serif'
plt.rcParams['lines.linewidth'] = 1

enter image description here

Mr. Nobody
  • 200
  • 9
  • 1
    You can try `ax.get_yaxis().get_major_formatter().set_useOffset(False)` [doc](https://matplotlib.org/3.1.1/api/ticker_api.html). See also [Is ticklabel_format broken?](https://stackoverflow.com/questions/18209462/is-ticklabel-format-broken) – JohanC Aug 30 '20 at 21:45
  • The first one worked for me, so if you want to, post it as an answer. Thank you! – Mr. Nobody Aug 30 '20 at 21:53
  • You better close the question, as it is a clear duplicate – JohanC Aug 30 '20 at 21:54
  • Oh Ok, if you want to you can do it because I've searched for the duplicate and haven't found it. – Mr. Nobody Aug 30 '20 at 22:06

0 Answers0