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

Appearance settings

Commit ffa8471

Browse filesBrowse files
committed
Test marker=MarkerStyle instance
Creating markers from MarkerStyle and passing them to axes could cause both `plot` and `errorbar` to raise ``` TypeError: float() argument must be a string or a number, not 'MarkerStyle' ``` in 3.2.2, as found in #18600 and discussed in the comments of #18603. `test_marker_as_MarkerStyle` ensures that a MarkerStyle instance can be used as the marker argument to plot, scatter, and errorbar.
1 parent 243920d commit ffa8471
Copy full SHA for ffa8471

File tree

Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed

‎lib/matplotlib/tests/test_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_axes.py
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,6 +1316,12 @@ def test_arc_ellipse():
13161316

13171317
ax.add_patch(e2)
13181318

1319+
def test_marker_as_MarkerStyle():
1320+
fix, ax = plt.subplots()
1321+
m = mmarkers.MarkerStyle('o')
1322+
plt.plot([1,2,3],[3,2,1], marker=m)
1323+
plt.scatter([1,2,3],[4,3,2], marker=m)
1324+
plt.errorbar([1,2,3],[5,4,3], marker=m)
13191325

13201326
@image_comparison(['markevery'], remove_text=True)
13211327
def test_markevery():

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.