Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

re-export plotly.express #117

Merged
merged 2 commits into from
Jul 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# Plotly Express

Plotly Express is a terse, consistent, high-level wrapper around [Plotly.py](https://plot.ly/python) for rapid data exploration and figure generation.

Documentation and examples can be found at https://plotly.express/
Plotly Express is now part of Plotly.py version 4 and so the `plotly_express` module now just re-exports the contents of `plotly.express`

## Installation

Plotly Express is compatible with Python 3+ and Python 2.7.
You can just follow the [`plotly` Getting Started](https://plot.ly/python/getting-started/) instructions for installation and get access to `plotly.express` that way. If you have existing code that imports from `plotly_express` explicitly and you don't wish to change it, you can still install the latest version, which just exposes `plotly.express` under the `plotly_express` namespace.

### Via `pip`

Expand All @@ -16,10 +14,6 @@ Just running `pip install plotly_express` in your terminal should do it!

You'll have to install from the `plotly` channel with `conda install -c plotly plotly_express`

### Running in JupyterLab

Using Plotly Express in JupyterLab requires the [`plotly-extension`](https://github.com/jupyterlab/jupyter-renderers/tree/master/packages/plotly-extension) to be installed by running `jupyter labextension install @jupyterlab/plotly-extension`.

## Troubleshooting
## Getting Help

Plotly Express depends on very recent versions of `plotly` and it's sometimes possible to get into a state where you have multiple versions of `plotly` installed (e.g. once with `pip` and once with `conda`) so be sure to check your version by running `plotly.__version__` in the same environment that you're having issues with `plotly_express`.
Please join our [Community Forum](https://community.plot.ly/c/api/python) or file a [Github Issue](https://github.com/plotly/plotly.py/issues/new) if you've found a bug.
12 changes: 6 additions & 6 deletions gallery.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,18 +189,18 @@ px.line_3d(election, x="Joly", y="Coderre", z="Bergeron", color="winner", line_d
## Polar Coordinates

```python
px.scatter_polar(wind, r="value", theta="direction", color="strength", symbol="strength",
color_discrete_sequence=px.colors.sequential.Plotly[-2::-1])
px.scatter_polar(wind, r="frequency", theta="direction", color="strength", symbol="strength",
color_discrete_sequence=px.colors.sequential.Plasma[-2::-1])
```

```python
px.line_polar(wind, r="value", theta="direction", color="strength", line_close=True,
color_discrete_sequence=px.colors.sequential.Plotly[-2::-1])
px.line_polar(wind, r="frequency", theta="direction", color="strength", line_close=True,
color_discrete_sequence=px.colors.sequential.Plasma[-2::-1])
```

```python
px.bar_polar(wind, r="value", theta="direction", color="strength", template="plotly_dark",
color_discrete_sequence= px.colors.sequential.Plotly[-2::-1])
px.bar_polar(wind, r="frequency", theta="direction", color="strength", template="plotly_dark",
color_discrete_sequence= px.colors.sequential.Plasma[-2::-1])
```

## Maps
Expand Down
75 changes: 4 additions & 71 deletions plotly_express/__init__.py
Original file line number Diff line number Diff line change
@@ -1,75 +1,8 @@
"""
`plotly_express` is a terse, consistent, high-level wrapper around `plotly` for rapid \
data exploration and figure generation. See the gallery at https://plotly.github.io/plotly_express
`plotly_express` is now an alias to `plotly.express`
"""

__version__ = "0.3.1"
__version__ = "0.4.0"

from ._chart_types import ( # noqa: F401
scatter,
scatter_3d,
scatter_polar,
scatter_ternary,
scatter_mapbox,
scatter_geo,
line,
line_3d,
line_polar,
line_ternary,
line_mapbox,
line_geo,
area,
bar,
bar_polar,
violin,
box,
strip,
histogram,
scatter_matrix,
parallel_coordinates,
parallel_categories,
choropleth,
density_contour,
density_heatmap,
)

from ._core import ( # noqa: F401
ExpressFigure,
set_mapbox_access_token,
defaults,
get_trendline_results,
)

from . import data, colors # noqa: F401

__all__ = [
"scatter",
"scatter_3d",
"scatter_polar",
"scatter_ternary",
"scatter_mapbox",
"scatter_geo",
"scatter_matrix",
"density_contour",
"density_heatmap",
"line",
"line_polar",
"line_ternary",
"line_mapbox",
"line_geo",
"parallel_coordinates",
"parallel_categories",
"area",
"bar",
"bar_polar",
"violin",
"box",
"strip",
"histogram",
"choropleth",
"data",
"colors",
"set_mapbox_access_token",
"get_trendline_results",
"ExpressFigure",
]
from plotly.express import *
from plotly.express import line_3d
Loading