I have the log scale in the y axis set as plt.yscale('log')
. I also want to specify the labels and ticks on this same axis. For some reason, there is a plot for which I do
plt.yticks([10**(-3), 10**(-1), 1, 10**1, 10**3], (r'$10^{-3}$', r'$10^{-1}$', r'$10^{0}$', r'$10^{1}$', r'$10^{3}$'))
but there is a lot of extra ticks that do not correspond to the labels between e.g. 10^1 and 10^3. Is there a way to remove these?