Skip to content

Commit

Permalink
Merge pull request #451 from nschloe/markers
Browse files Browse the repository at this point in the history
Markers
  • Loading branch information
nschloe authored Nov 26, 2020
2 parents eb3a9ff + 4cf8e00 commit 7504127
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = tikzplotlib
version = 0.9.5
version = 0.9.6
author = Nico Schlömer
author_email = [email protected]
description = Convert matplotlib figures into TikZ/PGFPlots
Expand Down
16 changes: 11 additions & 5 deletions tikzplotlib/_markers.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
# for matplotlib markers, see: http://matplotlib.org/api/markers_api.html
# for matplotlib markers, see https://matplotlib.org/api/markers_api.html
_MP_MARKER2PGF_MARKER = {
".": "*", # point
# ",": # pixel
"o": "o", # circle
"+": "+", # plus
"P": "+", # actually plus filled
"x": "x", # x
"X": "x", # actually x filled
"None": None,
" ": None,
"": None,
}

# the following markers are only available with PGF's plotmarks library
# See
# <https://mirror.clientvps.com/CTAN/graphics/pgf/contrib/pgfplots/doc/pgfplots.pdf>,
# chapter 4.7, page 183 ff.
_MP_MARKER2PLOTMARKS = {
"v": ("triangle", ["rotate=180"]), # triangle down
"1": ("triangle", ["rotate=180"]),
"^": ("triangle", []), # triangle up
"2": ("triangle", []),
"<": ("triangle", ["rotate=270"]), # triangle left
"3": ("triangle", ["rotate=270"]),
">": ("triangle", ["rotate=90"]), # triangle right
"4": ("triangle", ["rotate=90"]),
"1": ("Mercedes star flipped", []),
"2": ("Mercedes star", []),
"3": ("Mercedes star", ["rotate=90"]),
"4": ("Mercedes star", ["rotate=270"]),
"s": ("square", []),
"p": ("pentagon", []),
"*": ("asterisk", []),
Expand Down

0 comments on commit 7504127

Please sign in to comment.