I have 2 sets of data, one that I have to display in bar subplots like this:
and second set is just data from which I need to draw contours. Is there a way in matplotlib to draw contours on the same figure as bar subplots over them to get effect like this:
Code I use to generate subplots:
nl = 0 fig, axs = plt.subplots(16,16, sharex='col', sharey='row', gridspec_kw={'hspace': 0, 'wspace': 0}, dpi = 300) for p in range(16): for r in range(16): axs[p,r].set_ylim(0,1.1) axs[p,r].set_xlim(-150,150) axs[p,r].xaxis.set_ticklabels([]) axs[p,r].yaxis.set_ticklabels([]) axs[p,r].xaxis.set_ticks([]) axs[p,r].xaxis.set_ticks([]) axs[p,r].tick_params(width=0) axs[p,r].bar(xp,wid[nl], width = 10) nl += 1
Also I would be really thankful for suggestions how to make those subplots square (like on the 2nd image)