-
-
Notifications
You must be signed in to change notification settings - Fork 2.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
Opacity in px.density_mapbox #2317
Opacity in px.density_mapbox #2317
Conversation
Thank you very much for the fix @tvaucher ! Another possibility would be to use the |
Like this then. The if is still necessary as you otherwise end up with |
thank you very much for your reactivity @tvaucher ! @nicolaskruchten you can choose between the two versions :-) |
Thanks for this PR! Looks like the I think what we should do is modify Thoughts? |
So revert back to something similar from my first commit like: if args["opacity"] is None:
if "barmode" in args and args["barmode"] == "overlay":
trace_patch["marker"] = dict(opacity=0.5)
elif constructor in [go.Densitymapbox, go.Pie, go.Funnel, go.Funnelarea]: # add more if existing
trace_patch["opacity"] = args["opacity"]
else:
trace_patch["marker"] = dict(opacity=args["opacity"]) As apparently both I think it's probably easier to maintain if you add new Figures as you would need anyway to change the trace_patch if it doesn't support If you tell me, I'll make the necessary modifications for your review. |
Yes, the changes you described above sound great to me! Thank you very much :) PS: if you rebase onto master now, that CI failure should clear up. |
Done. |
Thanks! Something is a bit odd about the rebase though, the diff looks like it includes parts of other pull requests... |
87e003d
to
fe0b1ed
Compare
Yes indeed. Messed a bit with the previous git rebase. It should be much cleaner now (rebased on master and replayed the last 3 commits that contain the real changes). |
Looks perfect, thanks! I'll do a bit more QA and then merge and it'll be part of the 4.6.0 release :) |
Hello,
This is a fix for #2316 that correctly map the opacity attribute in the
trace_path
.It allows to correctly pass
opacity
as an attribute inpx.density_mapbox
. Check the issue for reproducible code.Limitations: I'm not aware of another mapbox figure that would require this change as they use proper markers (scatter, line), but if you are, then please comment and I'll add that.
Thanks for your time.
plotly version=4.5.4