Thanks to visit codestin.com
Credit goes to github.com

Skip to content

update axes.arrow() and patches.FancyArrow documentation #941

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 13, 2012

Conversation

kaufman
Copy link
Contributor

@kaufman kaufman commented Jun 10, 2012

old help:

arrow(x, y, dx, dy, hold=None, **kwargs)
Call signature::

   arrow(x, y, dx, dy, **kwargs)

Draws arrow on specified axis from (*x*, *y*) to (*x* + *dx*,
*y* + *dy*).

Optional kwargs control the arrow properties:

Constructor arguments

    *length_includes_head*:
       *True* if head is counted in calculating the length.

    *shape*: ['full', 'left', 'right']

    *overhang*:
      distance that the arrow is swept back (0 overhang means
      triangular shape).

    *head_starts_at_zero*:
      If *True*, the head starts being drawn at coordinate 0
      instead of ending at coordinate 0.

Valid kwargs are:
  agg_filter: unknown
  alpha: float or None         

...

new help:

arrow(x, y, dx, dy, hold=None, **kwargs)
Call signature::

   arrow(x, y, dx, dy, **kwargs)

Draws arrow on specified axis from (*x*, *y*) to (*x* + *dx*,
*y* + *dy*). Uses FancyArrow patch to construct the arrow.

Optional kwargs control the arrow construction and properties:

Constructor arguments
  width: float (default: 0.001)
    width of full arrow tail

  length_includes_head: [True | False] (default: False)
    True if head is to be counted in calculating the length.

  head_width: float or None (default: 3*width)
    total width of the full arrow head

  head_length: float or None (default: 1.5 * head_width)
    length of arrow head

  shape: ['full', 'left', 'right'] (default: 'full')
    draw the left-half, right-half, or full arrow

  overhang: float (default: 0)
    fraction that the arrow is swept back (0 overhang means
    triangular shape). Can be negative or greater than one.

  head_starts_at_zero: [True | False] (default: False)
    if True, the head starts being drawn at coordinate 0
    instead of ending at coordinate 0.

Other valid kwargs (inherited from Patch) are:
  agg_filter: unknown
  alpha: float or None         

...

	to make more informative and add missing options

	modified:   lib/matplotlib/axes.py
	modified:   lib/matplotlib/patches.py
@mdboom
Copy link
Member

mdboom commented Jun 11, 2012

Our sphinx docstring standard, which is based on the Python standard library and not the Numpy standard (our Spinx usage predates Numpy's) is to italicize variable names using asterisks.

	modified:   lib/matplotlib/patches.py
@kaufman
Copy link
Contributor Author

kaufman commented Jun 11, 2012

I notice that the Patch additional kwargs has no markup...

@mdboom
Copy link
Member

mdboom commented Jun 13, 2012

Yes -- there are definitely places where the standard hasn't been followed. We need to devote some time to that at some point. This is looking much better. Merging.

mdboom added a commit that referenced this pull request Jun 13, 2012
	update axes.arrow() and patches.FancyArrow documentation
@mdboom mdboom merged commit 606ca15 into matplotlib:master Jun 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants