Skip to content

validation of pivot in quiver #3951

@tacaswell

Description

@tacaswell

Noted as part of #3907, the inputs on pivot for quiver is very permissive and will take 'mid' or 'middle', however it will also work with out exception with any string input (by just silently falling back to 'tail'):

X, Y = np.meshgrid(np.linspace(-np.pi, np.pi, 16), np.linspace(-np.pi, np.pi, 16))
v = np.sin(X)
u = np.cos(Y)
plt.quiver(X, Y, u, v)
plt.quiver(X, Y, u, v, color='b', pivot='ardvaark', alpha=.5)

I propose that a) we validate the input to be in {'tip', 'tail', 'mid', 'middle'} and accept but warn anything else down to tail for one version before raising.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy