MNT: use get_fillstyle not is_filled to null facecolor · matplotlib/matplotlib@a89443c · GitHub
Skip to content

Commit a89443c

Browse files
tacaswelltimhoffm
andcommitted
MNT: use get_fillstyle not is_filled to null facecolor
This is brittle, but matches the behavior in Line2D. MarkerStyle objects have two coupled, but not fully redundant methods for determining if the maker is filled: the `is_filled` and `get_fillstyle` methods. If `ms.get_fillstyle() == 'none'` then `ms.is_filled() is False`, however the converse is not True. In particular the markers that can not be filled (because the Paths they are made out of can not be closed) have `ms.get_fillstyle() == 'full'` and `ms.is_filled() is False`. In Line2D we filter on the value of `get_fillstyle` not on `is_filled` so do the same in `Axes.scatter`. In Line2D we do the validation at draw time (because Line2D holds onto its MarkerStyle object instead of just extracting the path). The logic for fillstyle on Markers came in via #447/ 213459e. closes #17849 Revises #17543 / d86cc2b Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
1 parent 947f1b8 commit a89443c

2 files changed

Lines changed: 55 additions & 2 deletions

File tree

lib/matplotlib/axes/_axes.py

Lines changed: 34 additions & 2 deletions

lib/matplotlib/tests/test_axes.py

Lines changed: 21 additions & 0 deletions

0 commit comments

Comments
 (0)