Skip to content

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

Merged
merged 1 commit into from
Dec 1, 2019

Conversation

timhoffm
Copy link
Member

PR Summary

Numpy-docification of PolyCollection and some related methods.

----------
verts : sequence
The sequence polygons described as (*verts0*, *verts1*, ...) where
each polygon *verts_i* is either a sequence of vertices (*x*, *y*),
Copy link
Contributor

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)
?

Copy link
Member Author

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.

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
Copy link
Contributor

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), ...

Copy link
Member Author

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.

@timhoffm timhoffm force-pushed the doc-poly-collection branch 2 times, most recently from 4a7d582 to 679ce70 Compare December 1, 2019 17:38
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
Copy link
Contributor

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*

Copy link
Member Author

Choose a reason for hiding this comment

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

Taken. 😄

Copy link
Contributor

@anntzer anntzer left a 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.

@timhoffm timhoffm force-pushed the doc-poly-collection branch from 679ce70 to ea6fd28 Compare December 1, 2019 18:12
@timhoffm timhoffm added this to the v3.3.0 milestone Dec 1, 2019
@timhoffm timhoffm merged commit 04acc1b into matplotlib:master Dec 1, 2019
@timhoffm timhoffm deleted the doc-poly-collection branch December 1, 2019 23:43
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.

2 participants