8000 Make inset indicator more visible in the example by ianhi · Pull Request #18795 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Make inset indicator more visible in the example #18795

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
Oct 23, 2020

Conversation

ianhi
Copy link
Contributor
@ianhi ianhi commented Oct 23, 2020

PR Summary

Adds an edgecolor='black' to the inset indicator in the example.

I learned how to do this earlier today and actually didn't realize from the example that there was already an inset indicator because I didn't notice it on account of it being so faint against the background. So I ended up googling something and then fond the api of indicate_inset. I think with this change I would have done all my learning from this example.

original:
image

this pr:
image

Ancillary suggestion: Change the default value of edgecolors from '0.5' to 'gray'

def indicate_inset(self, bounds, inset_ax=None, *, transform=None,
facecolor='none', edgecolor='0.5', alpha=0.5,
zorder=4.99, **kwargs):

I actually didn't know you could specify colors like this in matplotlib and then got very confused when I got an error when I changed it 0.7 (w/o quotes) 🐑

PR Checklist

  • [N/A] Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • [N/A] New features are documented, with examples if plot related.
  • [N/A] Documentation is sphinx and numpydoc 8000 compliant (the docs should build without error).
  • [N/A] Conforms to Matplotlib style conventions (install flake8-docstrings and run flake8 --docstring-convention=all).
  • [N/A] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [N/A] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

@ianhi
Copy link
Contributor Author
ianhi commented Oct 23, 2020

The full on black inset lines is maybe not optimal aesthetic choice, but I think it elevates the example's raison d'être of helping people learn via the examples.

@story645
Copy link
Member

Nice. Also sort of think it might be good if you could make the connecting lines dashed, but that leads to an API change since right now the args are only passed through to the rectangle, so way out of scope of this PR...

@QuLogic QuLogic added this to the v3.4.0 milestone Oct 23, 2020
@QuLogic QuLogic merged commit 433b05c into matplotlib:master Oct 23, 2020
@ianhi ianhi deleted the inset-example branch December 3, 2020 16:33
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
0