Skip to content

Add drop shadow support to Annotation Box #13720

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

Open
dov opened this issue Mar 20, 2019 · 6 comments
Open

Add drop shadow support to Annotation Box #13720

dov opened this issue Mar 20, 2019 · 6 comments
Labels
keep Items to be ignored by the “Stale” Github Action New feature

Comments

@dov
Copy link

dov commented Mar 20, 2019

Feature request

Add an option to for drawing a drop shadow below the AnnotationBox . Here are a a list of options that I would like to see for this feature:

  • Color and alpha transparency of drop shadow
  • x,y displacement of the drop shadow
  • Gaussian bluring strength of the drop shadow (similar to blur% in inkscape)
@ImportanceOfBeingErnest
Copy link
Member

Maybe this needs a bit more detail, concerning in how far matplotlib.patches.Shadow would not be sufficient.

@dov
Copy link
Author

dov commented Mar 20, 2019

I fully agree it might just be my lack of understanding of how to use Shadow and would appreciate an example of how a Shadow of the same size as an AnnotationBox may be constructed.

@jklymak
Copy link
Member

jklymak commented Mar 20, 2019

Untested, but AnnotationBox should have a get_bbox_patch() method, that then you can pass to Shadow. A PR with a demo would be most welcome...

@ImportanceOfBeingErnest
Copy link
Member

There is also matplotlib.patheffects.SimplePatchShadow.
... which makes me wonder if both are really needed.

In any case none of them allow for gaussian bluring - which is in general something for which matplotlib does not have any API.

@github-actions
Copy link

github-actions bot commented Jun 9, 2023

This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!

@github-actions github-actions bot added the status: inactive Marked by the “Stale” Github Action label Jun 9, 2023
@oscargus
Copy link
Member

oscargus commented Jun 9, 2023

3.8 will add configuration of the pie (#25389) and legend (#24666) shadow. I guess this comes down to adding a shadow keyword argument to FancyBboxPatch in a similar manner? In that way one can pass shadow={'ox': 3, ...} as part of the bbox arguments (and this will also be applicable to quite a lot of other things relying on FancyBboxPatch).

This will not handle Gaussian blurring though(?). But that can be added to Shadow separately.

@oscargus oscargus added keep Items to be ignored by the “Stale” Github Action and removed status: inactive Marked by the “Stale” Github Action labels Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep Items to be ignored by the “Stale” Github Action New feature
Projects
None yet
Development

No branches or pull requests

5 participants