Let collections return linewidths "as is", without cycling. by anntzer · Pull Request #26043 · matplotlib/matplotlib · GitHub
Skip to content

Let collections return linewidths "as is", without cycling. - #26043

Open
anntzer wants to merge 1 commit into
matplotlib:mainfrom
anntzer:ubls
Open

anntzer wants to merge 1 commit into
matplotlib:mainfrom
anntzer:ubls

Conversation

@anntzer

@anntzer anntzer commented Jun 2, 2023

Copy link
Copy Markdown
Contributor

Previously, collections would return a "cycled" version of linewidths which is internally used to scale dashes (this scaling needs to be done at property setting time, because of the interaction with styles).

While it makes sense to store the cycled scaled dashes, there's no need to also store the cycled linewidths or pass that to the backend code -- directly using the uncycled linewidths seems simpler. This also makes collection.get_linewidths() return something much closer to whatever was passed in -- see the test change in test_lslw_bcast.

Also, "broadcasting" has a technical meaning in numpy; it's not the same thing as cycling.

PR summary

PR checklist

Previously, collections would return a "cycled" version of linewidths
which is internally used to scale dashes (this scaling needs to be done
at property setting time, because of the interaction with styles).

While it makes sense to store the cycled scaled dashes, there's no need
to also store the cycled linewidths or pass that to the backend code --
directly using the uncycled linewidths seems simpler.  This also makes
collection.get_linewidths() return something much closer to whatever was
passed in -- see the test change in test_lslw_bcast.
@oscargus

oscargus commented Jun 2, 2023

Copy link
Copy Markdown
Member

@anntzer

anntzer commented Jun 2, 2023

Copy link
Copy Markdown
Contributor Author

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