| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| Passing *linefmt* positionally is undeprecated | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| Positional use of all formatting parameters in `~.Axes.stem` has been | ||
| deprecated since Matplotlib 3.5. This deprecation is relaxed so that one can | ||
| still pass *linefmt* positionally, i.e. ``stem(x, y, 'r')``. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -3801,16 +3801,24 @@ def test_stem(use_line_collection): | |
|
|
||
|
|
||
| def test_stem_args(): | ||
| def _assert_equal(stem_container, expected): | ||
| x, y = map(list, stem_container.markerline.get_data()) | ||
| assert x == expected[0] | ||
| assert y == expected[1] | ||
|
|
||
| fig, ax = plt.subplots() | ||
|
|
||
| x = list(range(10)) | ||
| y = list(range(10)) | ||
| x = [1, 3, 5] | ||
| y = [9, 8, 7] | ||
|
|
||
| # Test the call signatures | ||
| ax.stem(y) | ||
| ax.stem(x, y) | ||
| ax.stem(x, y, linefmt='r--') | ||
| ax.stem(x, y, linefmt='r--', basefmt='b--') | ||
| _assert_equal(ax.stem(y), expected=([0, 1, 2], y)) | ||
| _assert_equal(ax.stem(x, y), expected=(x, y)) | ||
| _assert_equal(ax.stem(x, y, linefmt='r--'), expected=(x, y)) | ||
| _assert_equal(ax.stem(x, y, 'r--'), expected=(x, y)) | ||
| _assert_equal(ax.stem(x, y, linefmt='r--', basefmt='b--'), expected=(x, y)) | ||
| _assert_equal(ax.stem(y, linefmt='r--'), expected=([0, 1, 2], y)) | ||
| _assert_equal(ax.stem(y, 'r--'), expected=([0, 1, 2], y)) | ||
|
Comment thread
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityTest somewhere that the lines actually are red and dashed?
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
Sorry, something went wrong.
All reactions
|
||
|
|
||
|
|
||
| def test_stem_dates(): | ||
| Expand Down | ||
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.