-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Version 4 discussion #1420
Comments
Thanks for pulling this together! Agreed on all points I think! |
As discussed on Slack, v4 may also be a good opportunity to introduce default mobile support through the plotly.js |
## Overview This PR is an important step towards the [version 4 goal](#1420) of removing all of the chart studio (i.e. cloud-service related) functionality from plotly.py, and putting it in a separate optional package. ## chart studio extraction For the time being, I've done this by creating a new top-level `chart_studio` package next to the top-level `plotly` package. I've moved all of the cloud-related functionality to the `chart_studio` package, following the same structure as in the current plotly package. For example, the `plotly.plotly` module was moved to `chart_studio.plotly`. This PR takes advantage of the `_future_plotly_` system introduced in #1474 to make this refactor backward compatible. - By default all of the old entry points are still usable and they are aliased to the `chart_studio` package. - If the `extract_chart_studio` future flag is set, then deprecation warnings are raised whenever the `chart_studio` modules/functions are used from their legacy locations under the `plotly` package. - If the `remove_deprecations` future flag is set then the chart studio functions are fully removed from the plotly package and are accessible only under `chart_studio`. When `remove_deprecations` is set, `plotly` has no dependency on the `chart_studio` package. ## Usage To remove the chart_studio functionality from the main `plotly` module, use the ```python from _plotly_future_ import remove_deprecations ``` This will further speed up imports, and will allow for testing code to make sure it will be compatible with the package structure of plotly.py version 4. ## Import optimization This PR also makes a relatively minor change to the code generation logic for `graph_objs` and `validator` that yields an import time reduction of ~10-20% . Rather that creating a single file for each datatype and validator class, all of the classes in a `graph_obj` or `validator` module are specified directly in the `__init__.py` file. This reduces the number of files significantly, which seems to yield a modest but consistent speedup while being 100% backward compatible.
Target date for 4.0.0 release? :) |
Hopefully next week. Cross reference release candidate announcement https://community.plot.ly/t/introducing-plotly-py-4-0-0rc1/25639. |
@jonmmease I'll let you close this one out :) Nice job! |
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, 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 |
Overview
This is an issue for discussing what we'd like to work towards in a future version 4, mostly focusing on changes that would not be backwards compatible. Nothing here is set in stone and feedback is welcome.
Theming
Lets make the defualt theme be
plotly
orplotly_white
(#1224)Integrate
px
Integrate the
px
project for exploratory data analysis directly into plotly.py (https://github.com/plotly/px)Redo subplot support
There are a bunch of outstanding issues with the
make_subplots
function. The most significant limitation being that it doesn't support non-Cartesian subplot types.Last year, plotly.js introduced its own subplot layout system (
layout.grid
) so we could build the new subplot system on top of that (See plotly/plotly.js#3507 ). Hopefully we could still support themake_subplots
API, but give most of the work to plotly.jsI would also like to add support for accessing traces by subplot. Something like
figure.get_traces(row=2, col=1)
. This would allow users to construct an initial figure usingpx
, and then easily grab particular traces to customize using.update
or property assignment syntax. See #1484.Self displaying figures
I would like to allow
go.Figure
to display itself as a plotly.js figure when used in an ipython context. We have a prototype of this inpx
withFigurePx
https://github.com/plotly/px/blob/610910fd5f167de2482b01753db13cd0bd01c171/plotly_express/_px.py#L22-L33
I would like to extend this a bit so that it's possible to use a global setting to configure how
go.Figure
should display itself.FigurePx
is using theinit_notebook_mode
/iplot
approach, but I'd also like to support a static image display (using orca) that would be suitable for use in QtConsole/Spyder and for PDF export.These changes would not affect
FigureWidget
.FigureWidget
will remain a separate class that is distinct fromgo.Figure
in that is is a widget subclass and supports updating properties in place.Convert offline html export to
plotly.io
moduleReplace the
plotly.offline.plot
function with functions in theplotly.io
module (#1098)Split off choropleth figure factory into a separate package
Splitting the county choropleth figure factories into a separate package would help a lot with reducing the plotly.py package size. Then we could add additional shape files to that geo-plotly package to support different geographic regions.
Split off
plotly.plotly
chart-studio integration into a separate packageSplit off the functionality in
plotly.plotly
into a separate package calledchart_studio
. This will make it easier for people to understand that you can use plotly.py totally offline and without an account. Everything in theplotly
package would be offline, and the chart_studio integration is in thechart_studio
package.Along with the change to make figures self-displaying and to move the html output to
plotly.io
, this would mean that users would no longer need to figure out theonline
/offline
distinction. The plotly.py package just is offline, and you don't need to say offline anywhere to use it that way.Documentation
If not before, documentation should be updated to remove use of
iplot
and allow figures to display themselves in "offline" mode (plotly/documentation#992)Also, before the v3 to v4 jump we should finish working out how to version the documentation so that the version 3 docs can remain active alongside the version 4 docs.
cc @nicolaskruchten @jackparmer @chriddyp
The text was updated successfully, but these errors were encountered: