I have been looking around for a bit have already come across the following related questions: Matplotlib: disable powers of ten in log plot
However neither have been able to really help me. I am essentially making a reasonably simple scatter plot with an associated colour map, however I cannot seem to get rid of the power of 10 labelling on the y-axis. Here is my code and the resulting plot. 'teff', 'lum', and 'col1' are all series of dtype('float64'), and I have defined the colourmap 'rvb' in a separate function.
plt.figure(figsize=(12,6))
plt.scatter(teff,lum,s=10,c=col1, cmap=rvb)
plt.yscale('log')
plt.colorbar()
axes = plt.gca()
plt.gca().invert_xaxis()
plt.xlabel('Effective Temperature [K]')
plt.ylabel('Luminosity [L$_{\odot}$]')
plt.show()
I have tried a few variations of the following solution found in the similar questions
from matplotlib.ticker import ScalarFormatter
ax.get_yaxis().get_major_formatter().set_useOffset(False)
However I just get errors, e.g. 'LogFormatterSciNotation' object has no attribute 'set_useOffset'.
I have also tried to solve the issue using subplots but then I cannot get the colourmap to work. I am hoping for a solution that allows me to keep my plot looking almost identical, just with the powers of 10 changed to actual numbers, and if possible more regular intervals.
Thanks!