-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Conversation
We've added several custom reprs to objects, so these hard-coded results are no longer in sync with what anyone would see.
# | ||
# 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>] |
There was a problem hiding this comment.
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()) |
There was a problem hiding this comment.
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.
Would it be worth changing this to actually run the code rather than being hard-coded? |
and anyone can merge on green. |
Maybe, right now it's a bit of an odd mix of embedded scripts, and only one or two bits of actually running code. |
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