Skip to content

dea_tool.plotting.rgb adding custom titles causes error due to attribute error "missing axs object" #1334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jennaguffogg opened this issue Apr 7, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@jennaguffogg
Copy link
Collaborator

Describe the bug/issue
When trying to give a plot a custom title, an attribute error occurs due to missing 'axs' attribute.
ie:

AttributeError: 'AxesImage' object has no attribute 'axs'

Steps to reproduce
Steps to reproduce the behaviour. For example:

  1. Open DEA Sandbox
  2. Launch the "DEA_products/DEA_GeoMAD.ipynb" notebook
  3. in code cell 6, attempt to add 'titles' to the plotting function:
    rgb(ds, bands=["nbart_red", "nbart_green", "nbart_blue"], titles=pd.Timestamp(ds.time.values[0]).year)

Expected behaviour
The title in the output image should have been the year of the geomedian product ie '2021'

@jennaguffogg jennaguffogg added the bug Something isn't working label Apr 7, 2025
@jennaguffogg jennaguffogg moved this to Ideas and improvements 💡 in DEA Notebooks Community Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Ideas and improvements 💡
Development

No branches or pull requests

1 participant