When doing e.g. lrp.density(colorbar=True) and then calling pyplot functions like lrp._plt.scatter(x,y) to overplot details, these are instead plotted onto the colorbar Axes rather than the image.
This is a result of PlotBase._wcs_colorbar using AxesDivider.append_axes() to generate a colorbar axis. This axis then becomes the active axis when we make any future pyplot calls. The active axis can be reverted to the image axis by using plt.sca(ax)
In PlotBase._plot, this can be achieved by adding the following line to the if statement at line 376, below where _wcs_colorbar is called:
When doing e.g. lrp.density(colorbar=True) and then calling pyplot functions like lrp._plt.scatter(x,y) to overplot details, these are instead plotted onto the colorbar Axes rather than the image.
This is a result of PlotBase._wcs_colorbar using AxesDivider.append_axes() to generate a colorbar axis. This axis then becomes the active axis when we make any future pyplot calls. The active axis can be reverted to the image axis by using plt.sca(ax)
In PlotBase._plot, this can be achieved by adding the following line to the if statement at line 376, below where _wcs_colorbar is called:
self._plt.sca(self._axis[axidx])