📅  最后修改于: 2022-03-11 14:46:55.076000             🧑  作者: Mango
import matplotlib.pyplot as plt
fig, ax1 = plt.subplots()
ax2 = ax1.twiny()
ax1.set_zorder(1) # default zorder is 0 for ax1 and ax2
ax1.patch.set_visible(False) # prevents ax1 from hiding ax2