Skip to content

Conversion to Matplotlib PolyCollection Method (to_PolyCollection) #365

Closed

Description

@philipc2

Overview

Representing our unstructured grid data as a matplotlib.collection.PolyCollection is useful for visualization with Matplotlib. The PolyCollection will contain geometric data representing the polygons in the grid, and may optionally have an array of values to color the polygons.

Implementation

Grid.to_PolyCollection

Implementation here will construct and organize the polygons that will represent only the unstructured grid (no data variables) and return a PolyCollection. It should handle all data-cleaning (Antimeridian Splitting, Coordinate Verification, Coordinate Transforms, etc.)

UxDataArray.to_PolyCollection

Will internally call Grid.to_PolyCollection to construct or return the cached version of the PolyCollection with the grid representation already populated. Additionally will set the array of the PolyCollection with a 1D entry representing the values we want to shade each Polygon (Face) with.

Activity

  1. added
    new feature
    on Jul 3, 2023
  2. linked a pull request that will close this issueData Structures & Helpers for Visualization #354on Jul 3, 2023
  3. moved this from 📝 To Do to 🏗 In progress in UXarray Developmenton Jul 3, 2023
  4. added this to the Visualization milestone on Jul 27, 2023
  5. moved this from 🏗 In progress to ✅ Done in UXarray Developmenton Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

new feature

Type

No type

Fields

Priority

None yet

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions