Reputation: 6020
I do not understand why I cannot get x and y axes show up in both figures. I would like numbers and ticks in the main figure and subfigure. Please find below the code I've used.
# Main Plot
plt.axes([.1, .1, .8, .8])
plt.xticks(())
plt.yticks(())
plt.xlabel("Period")
plt.ylabel("Chi")
plt.minorticks_on()
plt.plot(period, chi, 'bo', markersize = 0.5)
# Subplot
plt.axes([.5, .2, .3, .3])
plt.xticks(())
plt.yticks(())
plt.xlim(3.27, 3.3)
plt.ylim(2,4)
plt.plot(period, chi, 'bo', markersize = 0.5)
plt.savefig("test_fig.jpg", dpi=200)
Upvotes: 0
Views: 302
Reputation: 58865
When you do:
plt.xticks(())
plt.yticks(())
you are removing the ticks by setting them to an empty sequence.
Upvotes: 2