Uh oh!
There was an error while loading. Please reload this page.
Add entrypoint for plotting backends - #3640
Conversation
dcherian
commented
Dec 18, 2019
EXCITING! |
crusaderky
commented
Jan 30, 2020
if you merge from master you should get all green on the upstream-dev test now |
dcherian
commented
Jan 30, 2020
@andersy005 can you summarize what's needed on the holoviews and xarray side for this to work? |
andersy005
commented
Jan 30, 2020
A while back I opened this issue holoviz/hvplot#392. I am about to make modifications to hvplot/holoviews locally to test that this PR is going to work as expected. Once I have a better understanding of what's needed, I will report back. |
andersy005
commented
Jan 30, 2020
After looking at Pandas source code, it's my understanding that
This approach makes interfacing with Pandas objects easy as long as the plotting library adheres to this plotting API. Currently, Xarray's plotting API is closely tied to matplotlib. To support entrypoint for other plotting backend will likely require defining something similar to Pandas's plotting API. Is my interpretation correct? Pinging @TomAugspurger, @jsignell and @jbednar as they may have ideas on how to proceed with this implementation. |
TomAugspurger
commented
Jan 30, 2020
Yep, that's the basic idea. Every call to |
philippjfr
commented
Apr 24, 2020
@andersy005 Sorry I never followed up here. Trying to get out a new hvPlot release very soon. What's the current status here? @jsignell do you have any comments? |
philippjfr
commented
Apr 24, 2020
To be clear, I'm just checking whether there's anything that I can or need to do in hvPlot so this can proceed smoothly. |
I put this PR on a back burner :). As I pointed out in #3640 (comment), it is my understand that xarray will need to define a minimal plotting API for this entrypoint feature to work properly. Would this plotting API be something xarray devs would be willing to have/support? Cc @shoyer@dcherian@jhamman I could be missing something here. So please let me know if there is another way of getting the entrypoint feature to work without needing to define a plotting API that third-party visualization libraries adheres to. |
andersy005
commented
Sep 26, 2021
Closing this because it has gone stale :( |
Do we not want to discuss this in the bi-weekly dev meetings perhaps? (Apologies if it has been and I just missed it.) This seems like a good idea to implement! |
andersy005
commented
Sep 26, 2021
👍🏽 I'm in favor of discussing this in the dev meetings... Being able to easily switch plotting backends would be a nice feature to have from a user's perspective. |
jsignell
commented
Sep 27, 2021
I'm sorry I missed pings on this. I am happy to join the dev meeting if that'd be helpful or I can just start paying better attention 🙄 |
TomNicholas
commented
Sep 27, 2021
There is a dev meeting this Wednesday (occurring every fortnight), would be great to see you there! |
Libraries, including
xarray, register backends viaentrypoints. Xarray adds an EntryPoint "group" in itssetup.py. Third party libraries add items to that group in theirsetup.pys.Xarray and the third-party library don't need to talk to each other directly to register a backend. They talk through
pkg_resources.For instance,
hvplot/holoviewswould add an EntryPoint forxarray_plotting_backendsin its setup.py:and xarray users should be able to achieve what @jsignell proposed in #3553:
black . && mypy . && flake8whats-new.rstfor all changes andapi.rstfor new API