Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
5a26bb9
Raise warning if both c and facecolors are used in scatter plot. In t…
NGWi Nov 12, 2024
f1966c2
Corrected flake8 formatting warnings.
NGWi Nov 12, 2024
53a0825
Removed offending whitespace and extra line.
NGWi Nov 13, 2024
a777a15
Merge branch 'issue24404_addwarning' of https://github.com/NGWi/matpl…
NGWi Nov 13, 2024
8031809
Corrected old test that qualified for the new warning.
NGWi Nov 13, 2024
8ae213c
Made message more concise, and straightened old test, to fulfill @tim…
NGWi Nov 18, 2024
49f03f7
Added test.
NGWi Nov 18, 2024
8234066
Corrected flake8 linting objections.
NGWi Nov 18, 2024
38c092a
Added direct test of _parse method to attempt to make Codecov happy.
NGWi Nov 18, 2024
e6e49aa
Added pragma tags for code coverage to ignore unused but untested sim…
NGWi Dec 3, 2024
39e1899
Raise warning if both c and facecolors are used in scatter plot. In t…
NGWi Nov 12, 2024
06c8a76
Corrected flake8 formatting warnings.
NGWi Nov 12, 2024
72138c6
Corrected old test that qualified for the new warning.
NGWi Nov 13, 2024
319b92b
Made message more concise, and straightened old test, to fulfill @tim…
NGWi Nov 18, 2024
e348dfc
Added test.
NGWi Nov 18, 2024
fcf6ce2
Corrected flake8 linting objections.
NGWi Nov 18, 2024
9601975
Added direct test of _parse method to attempt to make Codecov happy.
NGWi Nov 18, 2024
a18364c
Added pragma tags for code coverage to ignore unused but untested sim…
NGWi Dec 3, 2024
310a15f
Corrected placement of pragma tags and added 'currently unused' to Je…
NGWi Dec 4, 2024
7c01a7b
Tim's suggestion for naming test's list of colors.
NGWi Dec 4, 2024
fd3d9db
Corrected call to changed variable name.
NGWi Dec 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Made message more concise, and straightened old test, to fulfill @tim…
…hoffm's points.
  • Loading branch information
NGWi committed Dec 4, 2024
commit 319b92b002920f4a4440dc2cd06c32d59b470e80
3 changes: 1 addition & 2 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4674,8 +4674,7 @@ def _parse_scatter_color_args(c, edgecolors, kwargs, xsize,
if c is not None and facecolors is not None:
_api.warn_external(
"You passed both c and facecolor/facecolors for the markers. "
"Matplotlib is ignoring the facecolor "
"in favor of what you specified in c. "
"c has precedence over facecolor/facecolors. "
"This behavior may change in the future."
)

Expand Down
4 changes: 2 additions & 2 deletions lib/matplotlib/tests/test_legend.py
Original file line number Diff line number Diff line change
Expand Up @@ -969,12 +969,12 @@ def test_legend_pathcollection_labelcolor_markfacecolor_cmap():
# test the labelcolor for labelcolor='markerfacecolor' on PathCollection
# with colormaps
fig, ax = plt.subplots()
facecolors = mpl.cm.viridis(np.random.rand(10))
colormap = mpl.cm.viridis(np.random.rand(10))
Comment thread
NGWi marked this conversation as resolved.
Outdated
ax.scatter(
np.arange(10),
np.arange(10),
label='#1',
facecolor=facecolors
c=colormap
)

leg = ax.legend(labelcolor='markerfacecolor')
Expand Down