In matplotlib what is the way to have tick labels both at the bottom and in the top x axis? I have searched a lot and still can’t find how to do it.
Advertisement
Answer
Sorry, I lied in the comments. You can do this easily (but it seems to be badly documented)
fig, ax = plt.subplots(1, 1) ax.xaxis.set_tick_params(labeltop='on')