Skip to content

Improve quiver API to improve clarity and consistency #106

@JamesVarndell

Description

@JamesVarndell

Is your feature request related to a problem? Please describe.

Matplotlib's quiver API is not very well-suited to plotting meteorological data. Calibrating arrow sizes can only be done based on a combination of the axis dimensions, the axis units (e.g. lat & lon), size in inches or the resolution of the screen.

Instead, this issue proposes an additional method of sizing quiver arrows, based on the density of arrows on the plot and a scale value based on the input data's units.

Describe the solution you'd like

We should introduce new arguments for scale_units in quiver:

  • density - default, sizes based on the sparsest density (x or y)
  • density-y - sizes based on the density of qrrows in y
  • density-x - sizes based on the density of qrrows in x

In addition, in combination with these values the scale argument should accept statistics like mean, max, median etc.

Describe alternatives you've considered

No response

Additional context

No response

Organisation

ECMWF

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions