Skip to content

Fails to plot arrays with all values being zero #61

@tobstac

Description

@tobstac

Problem description

Checking the different variables in a dataset can result in

ValueError: x and y arguments to pcolormesh cannot have non-finite values or be of type numpy.ma.core.MaskedArray with masked values

if a field contains only zeros or missing values.

Expected Output

Plot it anyway. It might be a bit unnecessary in most cases as there is no information in it besides that a field is all zero (which, still, would be interesting for field containing any kind of mass balance and such). Also it might screw up further plots which are shown with additional (empty) colorbars for whatever reason.

I would very much appreciate if this could be fixed.

Thanks and best regards!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions