matplotlib 3.5.1

NotesParameters
__init__(self, ax, label, valmin, valmax, valinit=None, valfmt=None, closedmin=True, closedmax=True, dragging=True, valstep=None, orientation='horizontal', track_color='lightgrey', handle_style=None, **kwargs)

Notes

Additional kwargs are passed on to self.poly which is the ~matplotlib.patches.Polygon that draws the slider knob. See the .Polygon documentation for valid property names ( facecolor , edgecolor , alpha , etc.).

Parameters

ax : Axes

The Axes to put the slider in.

label : str

Slider label.

valmin : float

The minimum value of the slider.

valmax : float

The maximum value of the slider.

valinit : tuple of float or None, default: None

The initial positions of the slider. If None the initial positions will be at the 25th and 75th percentiles of the range.

valfmt : str, default: None

%-format string used to format the slider values. If None, a .ScalarFormatter is used instead.

closedmin : bool, default: True

Whether the slider interval is closed on the bottom.

closedmax : bool, default: True

Whether the slider interval is closed on the top.

dragging : bool, default: True

If True the slider can be dragged by the mouse.

valstep : float, default: None

If given, the slider will snap to multiples of valstep.

orientation : {'horizontal', 'vertical'}, default: 'horizontal'

The orientation of the slider.

track_color : color, default: 'lightgrey'

The color of the background track. The track is accessible for further styling via the track attribute.

handle_style : dict

Properties of the slider handles. Default values are

========= ===== ======= ========================================= Key Value Default Description ========= ===== ======= ========================================= facecolor color 'white' The facecolor of the slider handles. edgecolor color '.75' The edgecolor of the slider handles. size int 10 The size of the slider handles in points. ========= ===== ======= =========================================

Other values will be transformed as marker{foo} and passed to the ~.Line2D constructor. e.g. handle_style = {'style'='x'} will result in markerstyle = 'x' .

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /matplotlib/widgets.py#603
type: <class 'function'>
Commit: