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

Skip to content

Update hard-coded results in artist tutorial #17761

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 2 commits into from
Jun 26, 2020

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Jun 26, 2020

PR Summary

We've added custom repr for many objects, so these hard-coded results are not what someone would see in the console. Also, capitalize Matplotlib.

PR Checklist

  • [N/A] Has Pytest style unit tests
  • Code is Flake 8 compliant
  • [N/A] New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • [N/A] Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • [N/A] Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

QuLogic added 2 commits June 25, 2020 21:06
We've added several custom reprs to objects, so these hard-coded results
are no longer in sync with what anyone would see.
@tacaswell tacaswell added this to the v3.4.0 milestone Jun 26, 2020
#
# In [160]: print(fig.axes)
# [<matplotlib.axes.Subplot instance at 0xd54b26c>,
# <matplotlib.axes.Axes instance at 0xd3f0b2c>]
# [<AxesSubplot:>, <matplotlib.axes._axes.Axes object at 0x7f0768702be0>]
Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe we should add a __repr__ to Axes, too.

@@ -433,8 +451,8 @@ class in the matplotlib API, and the one you will be working with most
# None
#
# # and the transformation instance is set to the "identity transform"
# In [265]: print(rect.get_transform())
# <Affine object at 0x13695544>
# In [265]: print(rect.get_data_transform())
Copy link
Member Author

Choose a reason for hiding this comment

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

Note, get_transform is wrong, because it shows the re-scaling of a unit rectangle to the expected size, and not the identity transform that the tutorial is talking about here.

@tacaswell
Copy link
Member

Would it be worth changing this to actually run the code rather than being hard-coded?

@tacaswell
Copy link
Member

and anyone can merge on green.

@QuLogic
Copy link
Member Author

QuLogic commented Jun 26, 2020

Maybe, right now it's a bit of an odd mix of embedded scripts, and only one or two bits of actually running code.

@timhoffm timhoffm merged commit 45d27c9 into matplotlib:master Jun 26, 2020
@QuLogic QuLogic deleted the update-artist-tutorial branch June 26, 2020 06:59
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.

3 participants