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

Skip to content

Fix image watermark example where image was hidden by axes (#7265) #7273

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

Conversation

AndersonDaniel
Copy link
Contributor

Hi!

I'm new to matplotlib and would be happy to contribute if I can.
Did as @anntzer suggested in the issue (only with zorder=3 like in the Text class) and of course it worked:
ex

I was also wondering why FigureImage has zorder=0 by default, doesn't that mean images drawn on figures will always be hidden by the axes (unless the zorder argument is explicitly set)?

Another thing that could be a bit confusing is that the example passes the zorder keyword argument to figimage even though it's only intercepted by the constructor of Artist class (and thus doesn't appear in figimage's docs)... Then again maybe it's only confusing for new people :)

Thanks!

@NelleV
Copy link
Member

NelleV commented Oct 15, 2016

Hi @AndersonDaniel
Thanks for the patch! It looks good.

There's a lot of things that are confusing in matplotlib, whether you are advanced or a beginner. A lot of the choices where made a very long time ago and the context was different 10 - 15 years ago than it is now.

I was wondering if you had a little more courage and if you could also add a bit of documentation to this example, using a docstring at the top of the file to be sphinx-gallery compatible. It's just a docstring with a title and a small text description, with a blank line between the title and the description.

@NelleV NelleV changed the title Fix image watermark example where image was hidden by axes (#7265) [MRG+1] Fix image watermark example where image was hidden by axes (#7265) Oct 15, 2016
@NelleV
Copy link
Member

NelleV commented Oct 15, 2016

Note: this closes #7265

@AndersonDaniel
Copy link
Contributor Author

@NelleV Thanks for the quick response!
Added a title (that's what I understood is missing), is that what you meant?

@NelleV
Copy link
Member

NelleV commented Oct 16, 2016

Thanks! That looks good!

@tacaswell tacaswell merged commit b5d28f3 into matplotlib:master Oct 16, 2016
@tacaswell
Copy link
Member

@AndersonDaniel Thanks and congratulations on your first mpl contribution 🎉

Did you find this issue via the 'new-contributor-friendly' label?

tacaswell added a commit that referenced this pull request Oct 16, 2016
DOC: Fix image watermark example where image was hidden by axes

close #7265
@tacaswell
Copy link
Member

backported to v2.x as 421327d

@AndersonDaniel
Copy link
Contributor Author

Thanks @tacaswell ! Yes, I found it through both that label and "Difficulty: Easy"

@AndersonDaniel AndersonDaniel deleted the fix-image-watermark-example branch October 16, 2016 20:28
@QuLogic QuLogic added this to the 2.0.1 (next bug fix release) milestone Oct 16, 2016
@QuLogic QuLogic changed the title [MRG+1] Fix image watermark example where image was hidden by axes (#7265) Fix image watermark example where image was hidden by axes (#7265) Oct 16, 2016
@QuLogic QuLogic modified the milestones: 2.0.1 (next bug fix release), 2.0 (style change major release) Dec 7, 2016
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.

5 participants