Skip to content
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

Allow Offline Usage of GraphWidget #821

Closed
dhirschfeld opened this issue Aug 21, 2017 · 9 comments
Closed

Allow Offline Usage of GraphWidget #821

dhirschfeld opened this issue Aug 21, 2017 · 9 comments

Comments

@dhirschfeld
Copy link

It currently seems like the GraphWidget is only able to be used with online plots. I think there's a lot of value in enabling it to be used offline in conjunction with ipywidgets.

Note: This is a dup of #573 however I'm opening this as that issue is poorly named which may mean it doesn't get the attention it deserves.

@dhirschfeld
Copy link
Author

Since I'm looking to use plotly in conjunction with ipywidgets in jupyterlab I'll also cross-reference #641

@maegul
Copy link

maegul commented Aug 21, 2017

@dhirschfeld I get the impression that plotly are focusing on and endorsing their built in widget system. I don't think that it allows python functions to work as call backs, though I'm not 100% on that, but it does allow dynamic predefined changes to the plot.

@dhirschfeld
Copy link
Author

The builtin widget system is fine but somewhat limited in its expressivity. For more dynamic behaviour I gather the recommended solution is to use dash but IIUC that builds independent flask? applications whereas I'm wanting something to work in jupyterlab.

My usecase which I don't think can be done with the builtin widgets is to update the data for multiple traces based on the state of two dropdown widgets.

@maegul
Copy link

maegul commented Aug 21, 2017

Agreed.

Having used the underlying JS library before, which has useful plot updating and animating functions, I'm wondering how easy it might be to wrap these functions into some python functionality that is more expressive than their current system.

Having the built in widgets is nice in their ability to be defined in stand alone JSON strings. HoloViews has a way of permuting through all the options of any widgets, which is useful. Perhaps something like that, implemented as a nice expressive python function, employing the built in widgets, would be useful too.

@jackparmer
Copy link
Contributor

It would be awesome to see an offline version of GraphWidget! We're big fans of the ipywidgets framework, but most of our current offline Python bandwidth is focused on Dash (https://plot.ly/dash/gallery, https://plot.ly/products/dash/).

My usecase which I don't think can be done with the builtin widgets is to update the data for multiple traces based on the state of two dropdown widgets.

Dash could definitely accommodate this use case, see here for example: https://plot.ly/dash/dash-core-components

@dhirschfeld
Copy link
Author

What I'm after specifically is something which works in jupyterlab and AFAICS dash isn't designed to integrate with jupyterlab? It does seem pretty awesome though and I'm excited about it's possibilities but unless I'm wrong it seems aimed at building independent web apps rather than integrating as an extension for juypterlab.

@jackparmer
Copy link
Contributor

@dhirschfeld I see, yes, what you wrote is correct.
We'd love to build offline ipywidgets integration and it's not impossible that we'll get to it this year. Plotly.js is currently rethinking plot updates so that incremental changes can occur without full redraws (see plotly/plotly.js#1850 for example). Once that machinery is worked out, it will make (even more) sense to revisit offline ipywidgets.
Sorry we don't have a great solution for you right now.

@dhirschfeld
Copy link
Author

That's fine - I just opened this as a nice to have sometime in the future. I'm totally biased but I do think there will be a lot of value in it!

@jonmmease
Copy link
Contributor

Done in the new FigureWidget class in version 3.0.0! https://medium.com/@plotlygraphs/introducing-plotly-py-3-0-0-7bb1333f69c6

GraphWidget is going to be deprecated as soon as I get around to adding deprecation warnings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants