Skip to content

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Feb 11, 2022

PR Summary

(I was trying to improve the docs re: u,v in x,y units as discussed during the call, but can't figure out what scale_units=None (the default) is supposed to mean. Perhaps @efiring knows? :-))

PR Checklist

Tests and Styling

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • New features are documented, with examples if plot related.
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).

Copy link
Member

@efiring efiring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much nicer this way!

@QuLogic QuLogic added this to the v3.6.0 milestone Feb 12, 2022
@QuLogic QuLogic merged commit de6fe07 into matplotlib:main Feb 12, 2022
@efiring
Copy link
Member

efiring commented Feb 12, 2022

I think that scale_units=None effectively means "scale_units = units", so that under panning, zooming, and resizing, all vector dimensions scale together with whatever the "units" specifies. The default units is "width", so vector thickness and head width scale with the physical width of the axes. Then if scale_units = None, stretching the Axes width will make vectors both longer and thicker, but stretching the height will have no effect on the displayed vector. But if you want to have the vector thickness dimensions stay the same on the display while letting the lengths autoscale based on the physical size of the Axes, then you might set units="inches", while setting scale_units="width" and scale=None (for autoscaling).

@anntzer do you want to do more work on quiver, or should I give it a try?

@anntzer anntzer deleted the q branch February 12, 2022 10:29
@anntzer
Copy link
Contributor Author

anntzer commented Feb 12, 2022

I'll let you go for it, as this seems more efficient than me trying to figure out the intent by reading your code :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants