Skip to content

Add drop shadow support to Annotation Box #13720

Open

Description

@dov

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)

Activity

  1. ImportanceOfBeingErnest commented on Mar 20, 2019

    @ImportanceOfBeingErnest
    Member

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

  2. dov commented on Mar 20, 2019

    @dov
    Author

    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.

  3. jklymak commented on Mar 20, 2019

    @jklymak
    Member

    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...

  4. ImportanceOfBeingErnest commented on Mar 20, 2019

    @ImportanceOfBeingErnest
    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.

  5. github-actions commented on Jun 9, 2023

    @github-actions

    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!

  6. oscargus commented on Jun 9, 2023

    @oscargus
    Member

    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.

  7. added
    keepItems to be ignored by the “Stale” Github Action
    and removed
    status: inactiveMarked by the “Stale” Github Action
    on Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    New featurekeepItems to be ignored by the “Stale” Github Action

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions