Skip to content

pcolormesh actually requires the X,Y to be +1 size of the data array #107

@akrherz

Description

@akrherz

Kind of ran into an unexpected quirk with pcolormesh that perhaps could be improved to save users like me from themselves!

The X, Y arrays to this function need to be 1 larger than the data array so that the bounds of the grid cell are known. Matplotlib's code silently trims the array and will drop the rightmost column and top row.

The examples/plotsst.py suffers from this issue as X,Y,data are all (720, 1440), so the plot is not complete.

I am not sure what to suggest for a fix to this, perhaps simply documenting it is sufficient or maybe basemap should complain when this happens? If you think I should take my whining upstream to matplotlib, that's understandable :)

thank you.

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