Answers for "matplotlib bring plot to front in plots with twin axis"

0

matplotlib bring plot to front in plots with twin axis

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
Posted by: Guest on June-14-2021

Code answers related to "matplotlib bring plot to front in plots with twin axis"

Python Answers by Framework

Browse Popular Code Answers by Language