Skip to content

Quiverkey() positions arrow incorrectly with labelpos 'N' or 'S' #5613

@EdwinChan

Description

@EdwinChan

The documentation for quiverkey() in versions 1.3 through 1.5 states that

If labelpos is 'N' or 'S', X, Y give the position of the middle of the key arrow.

This guarantee is clearly violated in version 1.5:

quiver_1 4 3
quiver_1 5 0
quiver_1 5 0 548 g9230cac

The script that generated these figures is

import numpy
import matplotlib
from matplotlib import pyplot

plot = pyplot.quiver(*numpy.random.rand(2, 10, 10))
pyplot.xlim(-2, 12)
pyplot.ylim(-2, 12)
pyplot.quiverkey(plot, 0.5, 1, 1, 'N', labelpos='N')
pyplot.quiverkey(plot, 1, 0.5, 1, 'E', labelpos='E')
pyplot.quiverkey(plot, 0.5, 0, 1, 'S', labelpos='S')
pyplot.quiverkey(plot, 0, 0.5, 1, 'W', labelpos='W')
pyplot.annotate(matplotlib.__version__, (0, 0), (-1, 11), 'data', 'data',
  ha='left')
pyplot.savefig('quiver_{}.png'.format(matplotlib.__version__))

Metadata

Metadata

Assignees

Labels

No labels
No labels

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