Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #matplotlib #bring #plot #front #plots #twin #axis
ADD COMMENT
Topic
Name
7+6 =