Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

patheffects.SimpleLineShadow calling non-existent get_foreground method from GraphicsContextBase #28793

Copy link
Copy link
Open
@wsidl

Description

@wsidl
Issue body actions

Summary

Source documentation shares that if shadow_color is None, the rho value would be applied to the original color:

https://matplotlib.org/stable/api/patheffects_api.html#matplotlib.patheffects.SimpleLineShadow

Expected Behaviour

Using offset=(0, 0), shadow_color=None, rho=0.6, was looking to explore if a guassian blue would take place to generate a wide, feathered line following the pattern of a gaussian distribution.

Resulting Behaviour

Code fails with:

  File "/project/path/.venv/lib/python3.11/site-packages/matplotlib/patheffects.py", line 336, in draw_path
    r, g, b = (gc0.get_foreground() or (1., 1., 1.))[:3]
               ^^^^^^^^^^^^^^^^^^
AttributeError: 'GraphicsContextBase' object has no attribute 'get_foreground'. Did you mean: 'set_foreground'?

Related line in repo:

r, g, b = (gc0.get_foreground() or (1., 1., 1.))[:3]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.