-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Update docs of PolyCollection #15790
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
Conversation
lib/matplotlib/collections.py
Outdated
---------- | ||
verts : sequence | ||
The sequence polygons described as (*verts0*, *verts1*, ...) where | ||
each polygon *verts_i* is either a sequence of vertices (*x*, *y*), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
each polygon verts_i is an array-like of shape (nv, 2)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Taken a variation of this.
lib/matplotlib/collections.py
Outdated
each polygon *verts_i* is either a sequence of vertices (*x*, *y*), | ||
or it is an equivalent :mod:`numpy` array of shape (*nv*, 2). | ||
sizes : array-like, default: None | ||
Scaling factors for the polygons *verts_i*. The scaling is applied |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each polygon is scaled by the square-root of the corresponding entry in sizes (i.e., sizes specify the scaling of areas). The scaling is applied before the Artist master transform. If len(sizes) < len(verts), ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Taken a variation of this.
4a7d582
to
679ce70
Compare
lib/matplotlib/collections.py
Outdated
polygon *verts_i* are multiplied by the square-root of the | ||
corresponding entry in *sizes* (i.e., *sizes* specify the scaling | ||
of areas). The scaling is applied before the Artist master | ||
transform. If ``len(sizes) < len(verts)``, the additional values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if *sizes* is shorter than *verts*
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Taken. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a minor suggestion, take it or leave it, can merge postci.
679ce70
to
ea6fd28
Compare
PR Summary
Numpy-docification of
PolyCollection
and some related methods.