Skip to content

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

Open
@jennaguffogg

Description

@jennaguffogg

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Ideas and improvements 💡

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions