How can I add a colorbar after using rio.plot.show? I've tried a bunch of things but have gotten various errors
Here's one way I tried:
fig, ax = plt.subplots(figsize = (16, 16))
retted = rio.plot.show(ds, ax=ax, cmap='Greys_r')
fig.colorbar(retted, ax=ax)
plt.title("Original")
plt.show()
This has error: AttributeError: 'AxesSubplot' object has no attribute 'get_array'
i = ax.imshow(ds, cmap='Greys_r')
then cover this with the rio plot and finally add the colorbarplt.colorbar(i)
– Pedestal