Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite8ac9f1

Browse files
committed
Revert "Merge pull request#17543 from timhoffm/unfilled-markers"
This reverts commit16ae71f, reversingchanges made to7a6c5d3.
1 parent5354b70 commite8ac9f1

File tree

4 files changed

+6
-25
lines changed

4 files changed

+6
-25
lines changed

‎lib/matplotlib/axes/_axes.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4392,9 +4392,8 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
43924392
- 'none': No patch boundary will be drawn.
43934393
- A color or sequence of colors.
43944394
4395-
For non-filled markers, *edgecolors* is ignored. Instead, the color
4396-
is determined like with 'face', i.e. from *c*, *colors*, or
4397-
*facecolors*.
4395+
For non-filled markers, the *edgecolors* kwarg is ignored and
4396+
forced to 'face' internally.
43984397
43994398
plotnonfinite : bool, default: False
44004399
Set to plot points with nonfinite *c*, in conjunction with
@@ -4476,6 +4475,7 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
44764475
path=marker_obj.get_path().transformed(
44774476
marker_obj.get_transform())
44784477
ifnotmarker_obj.is_filled():
4478+
edgecolors='face'
44794479
iflinewidthsisNone:
44804480
linewidths=rcParams['lines.linewidth']
44814481
elifnp.iterable(linewidths):
@@ -4487,8 +4487,8 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
44874487

44884488
collection=mcoll.PathCollection(
44894489
(path,),scales,
4490-
facecolors=colorsifmarker_obj.is_filled()else'none',
4491-
edgecolors=edgecolorsifmarker_obj.is_filled()elsecolors,
4490+
facecolors=colors,
4491+
edgecolors=edgecolors,
44924492
linewidths=linewidths,
44934493
offsets=offsets,
44944494
transOffset=kwargs.pop('transform',self.transData),

‎lib/matplotlib/markers.py‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,7 @@ def _recache(self):
237237
self._snap_threshold=None
238238
self._joinstyle='round'
239239
self._capstyle='butt'
240-
# Initial guess: Assume the marker is filled unless the fillstyle is
241-
# set to 'none'. The marker function will override this for unfilled
242-
# markers.
243-
self._filled=self._fillstyle!='none'
240+
self._filled=True
244241
self._marker_function()
245242

246243
def__bool__(self):

‎lib/matplotlib/tests/test_axes.py‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1855,16 +1855,6 @@ def test_scatter_color(self):
18551855
withpytest.raises(ValueError):
18561856
plt.scatter([1,2,3], [1,2,3],color=[1,2,3])
18571857

1858-
deftest_scatter_unfilled(self):
1859-
coll=plt.scatter([0,1,2], [1,3,2],c=['0.1','0.3','0.5'],
1860-
marker=mmarkers.MarkerStyle('o',fillstyle='none'),
1861-
linewidths=[1.1,1.2,1.3])
1862-
assertcoll.get_facecolors().shape== (0,4)# no facecolors
1863-
assert_array_equal(coll.get_edgecolors(), [[0.1,0.1,0.1,1],
1864-
[0.3,0.3,0.3,1],
1865-
[0.5,0.5,0.5,1]])
1866-
assert_array_equal(coll.get_linewidths(), [1.1,1.2,1.3])
1867-
18681858
deftest_scatter_size_arg_size(self):
18691859
x=np.arange(4)
18701860
withpytest.raises(ValueError):

‎lib/matplotlib/tests/test_marker.py‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@
77
importpytest
88

99

10-
deftest_marker_fillstyle():
11-
marker_style=markers.MarkerStyle(marker='o',fillstyle='none')
12-
assertmarker_style.get_fillstyle()=='none'
13-
assertnotmarker_style.is_filled()
14-
15-
1610
deftest_markers_valid():
1711
marker_style=markers.MarkerStyle()
1812
mrk_array=np.array([[-0.5,0],

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp