Why doesn't ax1.set_yticks([])
, plt.yticks([])
, plt.setp(ax1.get_yticklabels(),visible=False)
plt.gca().set_yticks([])
, nor
plt.tick_params(left=False,bottom=False,labelleft=False,abelbottom=False)
remove the tick numbers in this plot?
import numpy as np
import matplotlib.pyplot as plt
xscalespace=np.logspace(1, 6, num=6)
fig, (ax1, ax2) = plt.subplots(2, sharey=False, figsize=(5,5))
frequenz = np.exp(np.linspace(0,1,11)*20)#dummy lines doesn't matter
amplitude = np.exp(-np.linspace(0,1,11))#they don't matter
plt.sca(ax1)
plt.xscale('log')
plt.yscale('log')
ax1.plot(frequenz,amplitude/15,"*",label="plot",color="green")
plt.legend()
plt.grid()
plt.ylim(0.1, 1)
ax1.set_yticks([])
plt.yticks([])
plt.setp(ax1.get_yticklabels(),visible=False)
plt.gca().set_yticks([])
plt.tick_params(left=False,
bottom=False,
labelleft=False,
labelbottom=False)
The reason I ask is, I am setting my own labels but they create conflict with these irremovable labels. And I've tried everything, but nothing seems to work.