Skip to content

Commit 98d19db

Browse files
committed
Merge pull request matplotlib#3378 from cimarronm/custommarkersizefix
BUG: Fixes custom path marker sizing Closes matplotlib#1980 Closes
2 parents d5e0e9d + edeba33 commit 98d19db

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/matplotlib/markers.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
"" nothing
4646
``'$...$'`` render the string using mathtext.
4747
`verts` a list of (x, y) pairs used for Path vertices.
48+
The center of the marker is located at (0,0) and
49+
the size is normalized.
4850
path a `~matplotlib.path.Path` instance.
4951
(`numsides`, `style`, `angle`) see below
5052
============================== ===============================================
@@ -269,7 +271,7 @@ def _set_custom_marker(self, path):
269271
verts = path.vertices
270272
rescale = max(np.max(np.abs(verts[:, 0])),
271273
np.max(np.abs(verts[:, 1])))
272-
self._transform = Affine2D().scale(1.0 / rescale)
274+
self._transform = Affine2D().scale(0.5 / rescale)
273275
self._path = path
274276

275277
def _set_path_marker(self):
Loading

0 commit comments

Comments
 (0)