Skip to content

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

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Jun 2, 2023

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

oscargus commented Jun 2, 2023

If we are to change the return values of these things, I'd like to chip in #23056 I foresee a major rebase effort if this goes in before (although I may be wrong).

@anntzer
Copy link
Contributor Author

anntzer commented Jun 2, 2023

I don't really mind either way, though I'd say the change here (making get_linewidths() return something closer to what was passed in) is more useful than the change in #23056 (which makes get_linestyle() return something different from what was passed in, if I understand it correctly). (Notwithstanding the other benefits of #23056.)

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