-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
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
Make Axes.stem take at least one argument. #1139
Changes from all commits
eb953ba
6973b56
6c02993
db493b5
94f640e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -901,6 +901,20 @@ def test_hist_stacked_weighted(): | |
ax = fig.add_subplot(111) | ||
ax.hist( (d1, d2), weights=(w1,w2), histtype="stepfilled", stacked=True) | ||
|
||
@cleanup | ||
def test_stem_args(): | ||
fig = plt.figure() | ||
ax = fig.add_subplot(1, 1, 1) | ||
|
||
x = range(10) | ||
y = range(10) | ||
|
||
# Test the call signatures | ||
ax.stem(y) | ||
ax.stem(x, y) | ||
ax.stem(x, y, 'r--') | ||
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. This call (and the next) "works", but never actually gets the linefmt. It is left behind in *args. plot() and scatter() has to do this sort of crap too. Essentially, you go through all of the remaining positional args, supplying them for the defaults to the pops of the kwargs. |
||
ax.stem(x, y, 'r--', basefmt='b--') | ||
|
||
@image_comparison(baseline_images=['transparent_markers'], remove_text=True) | ||
def test_transparent_markers(): | ||
np.random.seed(0) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like this big
try
/except
block. Is there a better way of doing this?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a thought... just how different are the call signatures for stem() and
plot()? Perhaps we can utilize the same mechanism for processing arguments?