📜  matplotlib 在双轴绘图中将绘图置于前面 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:55.076000             🧑  作者: Mango

代码示例1
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