-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
compat: Matplotlib 3.10.1 #6526
Conversation
# Matplotlib 3.10.1 started emitting this UserWarning: | ||
# You passed both c and facecolor/facecolors for the markers. | ||
# c has precedence over facecolor/facecolors. | ||
if MPL_GE_3_10_1 and "c" in node_opts: |
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 think we need the MPL check here, but I'm not 100%, so I added it.
We could also use MPL_GE_3_10_0
, as this has been tested, but could cause confusion...
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6526 +/- ##
==========================================
+ Coverage 88.22% 88.79% +0.57%
==========================================
Files 323 323
Lines 68946 68949 +3
==========================================
+ Hits 60829 61225 +396
+ Misses 8117 7724 -393 ☔ View full report in Codecov by Sentry. |
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.
In which context is this warning triggered when using HoloViews? Is it when plotting some built-in elements?
Ignore this, I missed the first message. Unless there's a way to modify the plot objects that generate this error, I guess it's okay. Just to be sure, it does mean that users who pass c and facecolor together via .opts() won't get the warning, right?
A MRE is: import holoviews as hv
hv.extension()
edges = [(0, 1)]
nodes = hv.Nodes([(0, 0, 0, 0.5), (0, 1, 1, 1.5)], vdims="color")
graph = hv.Graph((edges, nodes)).opts(node_color="color")
graph Where holoviews/holoviews/plotting/mpl/__init__.py Line 297 in 0ba7398
So it is because the default argument conflicts with |
The failing tests because of the updated UserWarning:
As far as I can see, we have relied on the behavior of
c
taking precedence overfacecolor
/facecolors
, so here we just remove the values from the node options.