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

Add output_type option to figure_factory functions #1079

Closed
jonmmease opened this issue Jul 28, 2018 · 1 comment
Closed

Add output_type option to figure_factory functions #1079

jonmmease opened this issue Jul 28, 2018 · 1 comment

Comments

@jonmmease
Copy link
Contributor

jonmmease commented Jul 28, 2018

I propose we add a new option to all figure factory methods named output_type. This may be set to 'Figure' (default), 'FigureWidget', or 'dict'.

Setting output_type to 'dict' would return only the dictionary version of the figure. This would be the fastest path, especially for figure factories that produce figures with lost of traces. It would provide an option for people to construct a complex figure with a figure factory, customize it, and then save it with plot/iplot without validation using the validate=False option. See dendrogram use-case described in #1052.

Setting output_type to 'FigureWidget' would directly return a FigureWidget instance. It would also open the door for figure factories to pre-install interactive functionality using callbacks for use in the Jupyter Notebook.

For example, we could add a datashader_scatter_plot figure factory that wraps the logic from this notebook: https://github.com/jonmmease/plotly_ipywidget_notebooks/blob/master/notebooks/DataShaderExample.ipynb. If ouput_type is 'Figure' or 'dict' then the datashader logic is executed once to build the data image for the initial axes ranges. If the ouput_type is 'FigureWidget' then, in addition, we would install the zoom/resize callback logic to automatically recompute the data image on zoom/resize.

@chriddyp @cldougl @Kully

@gvwilson
Copy link
Contributor

Hi - we are currently trying to tidy up Plotly's public repositories to help us focus our efforts on things that will help users most. Since this issue has been sitting for several years, so I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our backlog. Thanks for your help - @gvwilson

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

2 participants