scaleogram
scaleogram copied to clipboard
plotting cbar on another axis
I plot the colorbar on another axis (so I can align the scaleogram and the actual signal, vertically)
fig = plt.figure(constrained_layout=True)
gs = fig.add_gridspec(2, 2, width_ratios=[0.95, 0.05])
ax1 = fig.add_subplot(gs[0, 0])
ax2 = fig.add_subplot(gs[1, 0])
ax3 = fig.add_subplot(gs[1, 1])
ax1.plot(time,signal)
scg.cws(time, signal, ax=ax2, cbarkw={ 'cax':ax3 })
In this case the coi-line is plotted on the last added axis, here ax3
which is used for the colorbar.
This issue can be resolved by changing plt
to ax
in cws.py line 262
# plot the mask and forward user parameters
ax.plot(xmesh, ymask)
Duly noted, thanks @rainbowsend for the report, I will apply the change soon with a bunch of other small fixes.