patheffects
matplotlib.patheffects
Defines classes for path effects. The path effects are supported in Text, Line2D and Patch.
-
class matplotlib.patheffects.AbstractPathEffect(offset=(0.0, 0.0)) -
Bases:
objectA base class for path effects.
Subclasses should override the
draw_pathmethod to add effect functionality.Parameters: offset : pair of floats
The offset to apply to the path, measured in points.
-
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.
-
-
class matplotlib.patheffects.Normal(offset=(0.0, 0.0)) -
Bases:
matplotlib.patheffects.AbstractPathEffectThe ?identity? PathEffect.
The Normal PathEffect?s sole purpose is to draw the original artist with no special path effect.
Parameters: offset : pair of floats
The offset to apply to the path, measured in points.
-
class matplotlib.patheffects.PathEffectRenderer(path_effects, renderer) -
Bases:
matplotlib.backend_bases.RendererBaseImplements a Renderer which contains another renderer.
This proxy then intercepts draw calls, calling the appropriate
AbstractPathEffectdraw 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
AbstractPathEffectThe path effects which this renderer represents.
renderer :
matplotlib.backend_bases.RendererBaseinstance-
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)
-
-
class matplotlib.patheffects.PathPatchEffect(offset=(0, 0), **kwargs) -
Bases:
matplotlib.patheffects.AbstractPathEffectDraws a
PathPatchinstance whose Path comes from the original PathEffect artist.Parameters: offset : pair of floats
The offset to apply to the path, in points.
**kwargs :
All keyword arguments are passed through to the
PathPatchconstructor. The properties which cannot be overridden are ?path?, ?clip_box? ?transform? and ?clip_path?.-
draw_path(renderer, gc, tpath, affine, rgbFace)
-
-
class matplotlib.patheffects.SimpleLineShadow(offset=(2, -2), shadow_color='k', alpha=0.3, rho=0.3, **kwargs) -
Bases:
matplotlib.patheffects.AbstractPathEffectA simple shadow via a line.
Parameters: offset : pair of floats
The offset to apply to the path, in points.
shadow_color : color
The shadow color. Default is black. A value of
Nonetakes the original artist?s color with a scale factor ofrho.alpha : float
The alpha transparency of the created shadow patch. Default is 0.3.
rho : float
A scale factor to apply to the rgbFace color if
shadow_rgbFaceisNone. Default is 0.3.**kwargs
Extra keywords are stored and passed through to
AbstractPathEffect._update_gc().-
draw_path(renderer, gc, tpath, affine, rgbFace) -
Overrides the standard draw_path to add the shadow offset and necessary color changes for the shadow.
-
-
class matplotlib.patheffects.SimplePatchShadow(offset=(2, -2), shadow_rgbFace=None, alpha=None, rho=0.3, **kwargs) -
Bases:
matplotlib.patheffects.AbstractPathEffectA simple shadow via a filled patch.
Parameters: offset : pair of floats
The offset of the shadow in points.
shadow_rgbFace : color
The shadow color.
alpha : float
The alpha transparency of the created shadow patch. Default is 0.3. http://matplotlib.1069221.n5.nabble.com/path-effects-question-td27630.html
rho : float
A scale factor to apply to the rgbFace color if
shadow_rgbFaceis not specified. Default is 0.3.**kwargs
Extra keywords are stored and passed through to
AbstractPathEffect._update_gc().-
draw_path(renderer, gc, tpath, affine, rgbFace) -
Overrides the standard draw_path to add the shadow offset and necessary color changes for the shadow.
-
-
class matplotlib.patheffects.Stroke(offset=(0, 0), **kwargs) -
Bases:
matplotlib.patheffects.AbstractPathEffectA 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.
-
-
class matplotlib.patheffects.withSimplePatchShadow(offset=(2, -2), shadow_rgbFace=None, alpha=None, rho=0.3, **kwargs) -
Bases:
matplotlib.patheffects.SimplePatchShadowAdds a simple
SimplePatchShadowand then draws the original Artist to avoid needing to callNormal.Parameters: offset : pair of floats
The offset of the shadow in points.
shadow_rgbFace : color
The shadow color.
alpha : float
The alpha transparency of the created shadow patch. Default is 0.3. http://matplotlib.1069221.n5.nabble.com/path-effects-question-td27630.html
rho : float
A scale factor to apply to the rgbFace color if
shadow_rgbFaceis not specified. Default is 0.3.**kwargs
Extra keywords are stored and passed through to
AbstractPathEffect._update_gc().-
draw_path(renderer, gc, tpath, affine, rgbFace)
-
-
class matplotlib.patheffects.withStroke(offset=(0, 0), **kwargs) -
Bases:
matplotlib.patheffects.StrokeAdds a simple
Strokeand then draws the original Artist to avoid needing to callNormal.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)
-
Please login to continue.