-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix scatter alpha #8954
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
Fix scatter alpha #8954
Changes from all commits
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 |
---|---|---|
|
@@ -624,3 +624,14 @@ def test_lslw_bcast(): | |
col.set_linestyles(['-', '-', '-']) | ||
assert_equal(col.get_linestyles(), [(None, None)] * 3) | ||
assert_equal(col.get_linewidths(), [1, 2, 3]) | ||
|
||
|
||
@image_comparison(baseline_images=['scatter_post_alpha'], | ||
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. Is this a test that can just be a "check the colours haven't changed" test instead of an image test? 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. I don't think so as there is some draw-time computation that goes on here with the color mapping. |
||
extensions=['png'], remove_text=True, | ||
style='default') | ||
def test_scatter_post_alpha(): | ||
fig, ax = plt.subplots() | ||
sc = ax.scatter(range(5), range(5), c=range(5)) | ||
# this needs to be here to update internal state | ||
fig.canvas.draw() | ||
sc.set_alpha(.1) |
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.
Could you add an explanation here? I am still completely confused why this has to be here for setting alphas, but not anywhere else for any of the other colorsetting code.
Could this be the result of the collision of RGBA color specs and a separate alpha parameter?