matplotlib.patheffects
¶Defines classes for path effects. The path effects are supported in
Text
, Line2D
and Patch
.
matplotlib.patheffects.
AbstractPathEffect
(offset=(0.0, 0.0))¶Bases: object
A base class for path effects.
Subclasses should override the draw_path
method to add effect
functionality.
Parameters: | offset : pair of floats
|
---|
draw_path
(renderer, gc, tpath, affine, rgbFace=None)¶Derived should override this method. The arguments are the same
as matplotlib.backend_bases.RendererBase.draw_path()
except the first argument is a renderer.
matplotlib.patheffects.
Normal
(offset=(0.0, 0.0))¶Bases: matplotlib.patheffects.AbstractPathEffect
The “identity” PathEffect.
The Normal PathEffect’s sole purpose is to draw the original artist with no special path effect.
Parameters: | offset : pair of floats
|
---|
matplotlib.patheffects.
PathEffectRenderer
(path_effects, renderer)¶Bases: matplotlib.backend_bases.RendererBase
Implements a Renderer which contains another renderer.
This proxy then intercepts draw calls, calling the appropriate
AbstractPathEffect
draw method.
Note
Not all methods have been overridden on this RendererBase subclass. It may be necessary to add further methods to extend the PathEffects capabilities further.
Parameters: | path_effects : iterable of
renderer : |
---|
copy_with_path_effect
(path_effects)¶draw_markers
(gc, marker_path, marker_trans, path, *args, **kwargs)¶draw_path
(gc, tpath, affine, rgbFace=None)¶draw_path_collection
(gc, master_transform, paths, *args, **kwargs)¶new_gc
()¶points_to_pixels
(points)¶matplotlib.patheffects.
PathPatchEffect
(offset=(0, 0), **kwargs)¶Bases: matplotlib.patheffects.AbstractPathEffect
Draws a PathPatch
instance whose Path
comes from the original PathEffect artist.
Parameters: | offset : pair of floats
**kwargs :
|
---|
draw_path
(renderer, gc, tpath, affine, rgbFace)¶matplotlib.patheffects.
SimpleLineShadow
(offset=(2, -2), shadow_color='k', alpha=0.3, rho=0.3, **kwargs)¶Bases: matplotlib.patheffects.AbstractPathEffect
A simple shadow via a line.
Parameters: | offset : pair of floats
shadow_color : color
alpha : float
rho : float
**kwargs
|
---|
draw_path
(renderer, gc, tpath, affine, rgbFace)¶Overrides the standard draw_path to add the shadow offset and necessary color changes for the shadow.
matplotlib.patheffects.
SimplePatchShadow
(offset=(2, -2), shadow_rgbFace=None, alpha=None, rho=0.3, **kwargs)¶Bases: matplotlib.patheffects.AbstractPathEffect
A simple shadow via a filled patch.
Parameters: | offset : pair of floats
shadow_rgbFace : color
alpha : float
rho : float
**kwargs
|
---|
draw_path
(renderer, gc, tpath, affine, rgbFace)¶Overrides the standard draw_path to add the shadow offset and necessary color changes for the shadow.
matplotlib.patheffects.
Stroke
(offset=(0, 0), **kwargs)¶Bases: matplotlib.patheffects.AbstractPathEffect
A line based PathEffect which re-draws a stroke.
The path will be stroked with its gc updated with the given keyword arguments, i.e., the keyword arguments should be valid gc parameter values.
draw_path
(renderer, gc, tpath, affine, rgbFace)¶draw the path with updated gc.
matplotlib.patheffects.
withSimplePatchShadow
(offset=(2, -2), shadow_rgbFace=None, alpha=None, rho=0.3, **kwargs)¶Bases: matplotlib.patheffects.SimplePatchShadow
Adds a simple SimplePatchShadow
and then draws the
original Artist to avoid needing to call Normal
.
Parameters: | offset : pair of floats
shadow_rgbFace : color
alpha : float
rho : float
**kwargs
|
---|
draw_path
(renderer, gc, tpath, affine, rgbFace)¶matplotlib.patheffects.
withStroke
(offset=(0, 0), **kwargs)¶Bases: matplotlib.patheffects.Stroke
Adds a simple Stroke
and then draws the
original Artist to avoid needing to call Normal
.
The path will be stroked with its gc updated with the given keyword arguments, i.e., the keyword arguments should be valid gc parameter values.
draw_path
(renderer, gc, tpath, affine, rgbFace)¶