Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove explicit children invalidation in update_position method #6692

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
Jul 12, 2016

Conversation

Kojoley
Copy link
Member

@Kojoley Kojoley commented Jul 5, 2016

This invalidation actually does nothing as the Line2D does not have nor use the _invalid field. There are _invalidx and _invalidy fields for this purpose, but them are private members. Moreover, the set_xdata and set_ydata methods internally invalidate the state (what is more reasonable
then an external invalidation).

@Kojoley Kojoley force-pushed the cleanup-axis-update_position branch from 22e7792 to 9eea40f Compare July 5, 2016 11:54
hasattr(self.axes, 'xaxis') and
self.axes.xaxis.get_scale() != 'linear')

def update_position(self, x):
Copy link
Member

Choose a reason for hiding this comment

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

Please do not change the arg names, it will break anyone who is unpacking dictionaries in to this method.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, sorry, I though that kwargs cannot be unpacked into positional arguments.

@tacaswell tacaswell added this to the 2.1 (next point release) milestone Jul 5, 2016
@tacaswell
Copy link
Member

It looks like these code blocks originate in 80cc9aa (in 2007) from @mdboom .

The commit message says that this was a performance related change.

@tacaswell
Copy link
Member

appveyor failure is connectivity to anaconda.org issue

@Kojoley
Copy link
Member Author

Kojoley commented Jul 5, 2016

I will make a performance test then, but the test suit runs the same amount of time with this change. And as I have mentioned in the commit message Line2D._invalid is unexisting field so it would be surprise if it actually does something.

@tacaswell
Copy link
Member

I suspect that (given the age) it was using some internal details that have moved under it. Don't worry about adding a performance test (unless @mdboom disagrees).

I think this is otherwise 👍 .

This invalidation actually does nothing as the `Line2D` does not have nor use
the `_invalid` field. There are `_invalidx` and `_invalidy` fields for this
purpose, but them are private members. Moreover, the `set_xdata` and
`set_ydata` methods internally invalidate the state (what is more reasonable
then an external invalidation).
@Kojoley Kojoley force-pushed the cleanup-axis-update_position branch from 9eea40f to 0847006 Compare July 5, 2016 14:00
@tacaswell tacaswell merged commit a578a7a into matplotlib:master Jul 12, 2016
@Kojoley Kojoley deleted the cleanup-axis-update_position branch July 12, 2016 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants