mpl.markers¶
This module contains functions to handle markers. Used by both the marker functionality of ~matplotlib.axes.Axes.plot and ~matplotlib.axes.Axes.scatter.
All possible markers are defined here:
| marker | description |
|---|---|
| ”.” | point |
| ”,” | pixel |
| “o” | circle |
| “v” | triangle_down |
| “^” | triangle_up |
| “<” | triangle_left |
| “>” | triangle_right |
| “1” | tri_down |
| “2” | tri_up |
| “3” | tri_left |
| “4” | tri_right |
| “8” | octagon |
| “s” | square |
| “p” | pentagon |
| “*” | star |
| “h” | hexagon1 |
| “H” | hexagon2 |
| “+” | plus |
| “x” | x |
| “D” | diamond |
| “d” | thin_diamond |
| “|” | vline |
| “_” | hline |
| TICKLEFT | tickleft |
| TICKRIGHT | tickright |
| TICKUP | tickup |
| TICKDOWN | tickdown |
| CARETLEFT | caretleft |
| CARETRIGHT | caretright |
| CARETUP | caretup |
| CARETDOWN | caretdown |
| “None” | nothing |
| None | nothing |
| ” “ | nothing |
| “” | nothing |
'$...$' |
render the string using mathtext. |
| verts | a list of (x, y) pairs used for Path vertices. The center of the marker is located at (0,0) and the size is normalized. |
| path | a ~matplotlib.path.Path instance. |
| (numsides, style, angle) | see below |
The marker can also be a tuple (numsides, style, angle), which will create a custom, regular symbol.
- numsides:
- the number of sides
- style:
the style of the regular symbol:
Value Description 0 a regular polygon 1 a star-like symbol 2 an asterisk 3 a circle (numsides and angle is ignored) - angle:
- the angle of rotation of the symbol, in degrees
For backward compatibility, the form (verts, 0) is also accepted, but it is equivalent to just verts for giving a raw set of vertices that define the shape.
Functions¶
is_math_text(s) |
|
is_numlike(obj) |
return true if obj looks like a number |
is_string_like(obj) |
Return True if obj looks like a string |
iterable(obj) |
return true if obj is iterable |
Classes¶
Affine2D([matrix]) |
A mutable 2D affine transformation. |
IdentityTransform(*args, **kwargs) |
A special class that does on thing, the identity transform, in a fast way. |
MarkerStyle([marker, fillstyle]) |
|
Path(vertices[, codes, ...]) |
Path represents a series of possibly disconnected, |
xrange |
xrange(start, stop[, step]) -> xrange object |