0

How can I plot the two measurement parameters (seasonal cover and permanent water cover) in the same axis as I want to compare them?

I have this code:

#load the cgls product
ds_cgls_builtcover = dc.load(product='cgls_landcover', time='2019', 
                             measurements=['seasonalwater_cover_fraction','permanentwater_cover_fraction'], 
                             like=ds_cgls.geobox).squeeze()

#plot the dataset
fig, (ax0, ax1) = plt.subplots(1,2, figsize=(24,9), sharex=True, sharey=True)
ds_cgls_builtcover.seasonalwater_cover_fraction.plot(ax=ax[0])
ds_cgls_builtcover.permanentwater_cover_fraction.plot(ax=ax[0])
plot_lulc(ds_cgls[measurements], product='CGLS', legend=True, ax=ax[1])

ax[0].set_title('seasonalwater_cover %')
ax[1].set_title('CGLS Landcover')
plt.tight_layout();

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.