-
-
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
Plot and style option name clashes #2411
Comments
I hope this is the only example of a clash we find. |
There's a few more, but it's not too bad: from itertools import combinations
def option_intersections(backend):
options = hv.Store.options(backend)
for k, opts in options.items():
if len(k) > 1: continue
eltype = k[0]
valid_options = {k: set(o.allowed_keywords)
for k, o in opts.groups.items()}
for g1, g2 in combinations(['plot', 'style', 'norm'], 2):
intersection = valid_options[g1] & valid_options[g2]
if intersection:
print('%s element %s and %s %s backend options intersect on: %s'
% (eltype, g1, g2, backend, intersection))
for backend in hv.Store.renderers:
option_intersections(backend)
|
Maybe for |
Bokeh Bars: width -> bar_width |
Those suggestions seem reasonable enough. The problem then is retaining the old names (and therefore the clashes) for backwards compatibility... |
Okay, I've come up with a plan for this, I'm going to make sure that plot options take precedence over style options in the |
These two were actually never used since the element defines that parameter. |
I'd consider those options deprecated immediately; deprecated just means "don't use in new code", right? So as soon as we know they shouldn't be in new code, shouldn't they be deprecated? |
True, I wasn't sure whether to add a warning, but I suppose we should. |
Whether to add a warning is a different matter than deprecating them. I'd say the thing to do immediately is to mark them deprecated in the release notes. Then in the following release, there can be a warning. |
Sounds good. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
The new .options method relies on unique names for plot and style options. At least in one case that is currently not true, namely the width option on Bars is both a plot options (controlling the width of the plot) and a style option (setting the width of the bars). We need to validate that these do not clash, and in the case of width rename the width style option to
bar_width
.The text was updated successfully, but these errors were encountered: