[Matplotlib-users] tuple-marker in style sheet

Julian Gethmann mail.python.org at gethmann.org
Wed Aug 9 07:54:54 EDT 2017


Hallo,

is it possible, and if so how, to define a marker with the tuple 
definition (numsides, style, angle) [1] inside a style sheet (or 
matplotlibrc)?

For normal markers I use the axes.prop_cycle like
```
axes.prop_cycle: cycler("marker", ["x", "+", "1"])
```
. If I now want to insert a tuple like marker,
```
axes.prop_cycle: cycler("marker", ["x", "+", (5, 2, 1)])
```
  then it is being transformed into a string `"(5, 2, 1)"`.
If I don't use parenthesis like in other tuple values in the 
matplotlibrc (e. g. `#lines.dashed_pattern : 2.8, 1.`[2]) then it is 
interpreted as three different marker styles which do not exist [3].

[1] http://matplotlib.org/api/markers_api.html
[2] http://matplotlib.org/_static/matplotlibrc
[3] in my example: `ValueError: Unrecognized marker style 5`


Many thanks,

Julian


More information about the Matplotlib-users mailing list