8000 Change string representation of AxesImage by timhoffm · Pull Request #22485 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Change string representation of AxesImage #22485

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
Feb 18, 2022
Merged

Conversation

timhoffm
Copy link
Member
  • The current implementation was unhelpful / incorrect: It returned
    the axes bounding box: Fixes AxesImage.__str__ is wrong if the image does not span the full Axes. #20294.
  • The string should contain helpful information. I argue that the
    figure coordinates of the image are not helpful most of the time.
    Instead, giving the number of pixels seems more useful. Note that
    str does not need to be unique.
  • Also move the definition to the base class and make it
    type-agnostic so that it works correctly for all derived classes.

@timhoffm timhoffm added this to the v3.6.0 milestone Feb 17, 2022
- The current implementation was unhelpful / incorrect: It returned
  the axes bounding box: Fixes matplotlib#20294
- The string should contain helpful information. I argue that the
  figure coordinates of the image are not helpful most of the time.
  Instead, giving the number of pixels seems more useful. Note that
  __str__ does not need to be unique.
- Also move the definition to the base class and make it
  type-agnostic so that it works correctly for all derived classes.
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.

AxesImage.__str__ is wrong if the image does not span the full Axes.
3 participants
0