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

Commite5a6cd6

Browse files
authored
Merge pull request#12531 from meeseeksmachine/auto-backport-of-pr-12431-on-v3.0.x
Backport PR#12431 on branch v3.0.x (FIX: allow single-string color for scatter)
2 parents9b4cbcd +1f2ca01 commite5a6cd6

File tree

5 files changed

+209
-519
lines changed

5 files changed

+209
-519
lines changed

‎lib/matplotlib/axes/_axes.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
importcollections
12
importfunctools
23
importitertools
34
importlogging
@@ -4187,7 +4188,11 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
41874188
valid_shape=True# will be put to the test!
41884189
n_elem=-1# used only for (some) exceptions
41894190

4190-
ifc_noneorcoisnotNone:
4191+
if (c_noneor
4192+
coisnotNoneor
4193+
isinstance(c,str)or
4194+
(isinstance(c,collections.Iterable)and
4195+
isinstance(c[0],str))):
41914196
c_array=None
41924197
else:
41934198
try:# First, does 'c' look suitable for value-mapping?
Binary file not shown.
Loading

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp