10000 Merge branch 'doc-prod' into bar-chart-data-formats · FernandezMathieu/plotly.py@50cc594 · GitHub
[go: up one dir, main page]

Skip to content

Commit 50cc594

Browse files
Merge branch 'doc-prod' into bar-chart-data-formats
2 parents e4ff910 + d2e7667 commit 50cc594

File tree

127 files changed

+219544
-9467
lines changed
  • test_px
  • test_utils
  • test_optional
  • test/percy
  • Some content is hidden

    Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

    127 files changed

    +219544
    -9467
    lines changed

    .gitignore

    Lines changed: 1 addition & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -46,3 +46,4 @@ temp-plot.html
    4646
    doc/python/.ipynb_checkpoints
    4747
    doc/python/.mapbox_token
    4848
    doc/.ipynb_checkpoints
    49+
    doc/check-or-enforce-order.py

    CHANGELOG.md

    Lines changed: 51 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -2,6 +2,57 @@
    22
    All notable changes to this project will be documented in this file.
    33
    This project adheres to [Semantic Versioning](http://semver.org/).
    44

    5+
    ## [4.10.0] - unreleased
    6+
    7+
    8+
    ## [4.9.1] - unreleased
    9+
    10+
    11+
    ## [4.9.0] - 2020-07-16
    12+
    13+
    ### Added
    14+
    15+
    - Added image export support using [Kaleido](https://github.com/plotly/Kaleido). The image export backend can be configured using the new `engine` argument to `plotly.io.to_image` and `plotly.io.write_image`. The `engine` argument may be set to `"kaleido"`, `"orca"`, or `"auto"`. The default is `engine="auto"`, in which case the Kaleido backend is enabled if the `kaleido` package from PyPI is installed, otherwise Orca is used. ([#2613](https://github.com/plotly/plotly.py/pull/2613)).
    16+
    - `plotly.express.timeline()` added as an official alternative to `plotly.figure_factories.create_gantt()` ([#2626](https://github.com/plotly/plotly.py/pull/2626))
    17+
    - `create_hexbin_mapbox()` added to Figure Factories, with thanks to [@RenaudLN](https://github.com/RenaudLN) for the impressive contribution!
    18+
    - `facet_row_spacing` and `facet_col_spacing` added to Plotly Express cartesian 2d functions ([#2614](https://github.com/plotly/plotly.py/pull/2614))
    19+
    - `base` added to Plotly Express `bar` and `bar_polar` functions ([#2626](https://github.com/plotly/plotly.py/pull/2626))
    20+
    - `px.NO_COLOR` constant to override wide-form color assignment in Plotly Express ([#2614](https://github.com/plotly/plotly.py/pull/2614))
    21+
    22+
    ### Fixed
    23+
    24+
    - trendline traces are now of type `scattergl` when `render_mode="webgl"` in Plotly Express ([#2614](https://github.com/plotly/plotly.py/pull/2614))
    25+
    - regression from 4.8.1 whereby `"parent"` was not accepted as part of `path` for `px.sunburst()` and `px.treemap()` ([#2640](https://github.com/plotly/plotly.py/pull/2640))
    26+
    - `create_dendrogram()` figure factory now works correctly with `scipy` 1.5.1 ([#2627](https://github.com/plotly/plotly.py/pull/2627))
    27+
    28+
    ### Updated
    29+
    30+
    - Updated Plotly.js to version 1.54.6. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/v1.54.6/CHANGELOG.md) for more information.
    31+
    - Added all cartesian-2d Plotly Express functions, plus `imshow`, to Pandas backend with `kind` option ([#2541](https://github.com/plotly/plotly.py/pull/2541))
    32+
    - `plotly.express.imshow` now uses data frame index and columns names and values to populate axis parameters by default ([#2539](https://github.com/plotly/plotly.py/pull/2539))
    33+
    - Javascript extensions are now build using Node 12, and have an updated `package-lock.json` with many fewer security warnings ([#2636](https://github.com/plotly/plotly.py/pull/2636))
    34+
    35+
    36+
    ## [4.8.2] - 2020-06-26
    37+
    38+
    ### Updated
    39+
    40+
    - Updated Plotly.js to version 1.54.5. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/v1.54.5/CHANGELOG.md) for more information.
    41+
    - `add_traces()` now accepts bare `int`-like values for `rows`/`cols` as well as lists thereof ([#2546](https://github.com/plotly/plotly.py/pull/2546)), with thanks to [@MCBoarder289](https://github.com/MCBoarder289) for the contribution!
    42+
    43+
    ### Fixed
    44+
    45+
    - `row`/`col` now accept `int`-like values, not strictly `int` values ([#2451](https://github.com/plotly/plotly.py/pull/2451)), with thanks to [@MCBoarder289](https://github.com/MCBoarder289) for the contribution!
    46+
    - Fixed special cases with `px.sunburst` and `px.treemap` with `path` input ([#2524](https://github.com/plotly/plotly.py/pull/2524))
    47+
    - Fixed bug in `hover_data` argument of `px` functions, when the column name is changed with labels and `hover_data` is a dictionary setting up a specific format for the hover data ([#2544](https://github.com/plotly/plotly.py/pull/2544)).
    48+
    - Made the Plotly Express `trendline` argument more robust and made it work with datetime `x` values ([#2554](https://github.com/plotly/plotly.py/pull/2554))
    49+
    - Fixed bug in `px.sunburst` and `px.treemap`: when the `color` and `values` arguments correspond to the same column, a different aggregation function has to be used for the two arguments ([#2591](https://github.com/plotly/plotly.py/pull/2591))
    50+
    - Plotly Express wide mode now accepts mixed integer and float columns ([#2598](https://github.com/plotly/plotly.py/pull/2598))
    51+
    - Plotly Express `range_(x|y)` should not impact the unlinked range of marginal subplots ([#2600](https://github.com/plotly/plotly.py/pull/2600))
    52+
    - `px.line` now sets `line_group=<variable>` in wide mode by default ([#2599](https://github.com/plotly/plotly.py/pull/2599))
    53+
    - Corrected some regex warnings ([#2577](https://github.com/plotly/plotly.py/pull/2577)), with thanks to [@georgevdd](https://github.com/georgevdd) for the contribution!
    54+
    55+
    556
    ## [4.8.1] - 2020-05-28
    657

    758
    ### Fixed

    README.md

    Lines changed: 32 additions & 16 deletions
    Original file line numberDiff line numberDiff line change
    @@ -33,7 +33,7 @@
    3333

    3434
    ## Quickstart
    3535

    36-
    `pip install plotly==4.8.1`
    36+
    `pip install plotly==4.9.0`
    3737

    3838
    Inside [Jupyter notebook](https://jupyter.org/install) (installable with `pip install "notebook>=5.3" "ipywidgets>=7.2"`):
    3939

    @@ -82,13 +82,13 @@ Built on top of [plotly.js](https://github.com/plotly/plotly.js), `plotly.py` is
    8282
    plotly.py may be installed using pip...
    8383

    8484
    ```
    85-
    pip install plotly==4.8.1
    85+
    pip install plotly==4.9.0
    8686
    ```
    8787

    8888
    or conda.
    8989

    9090
    ```
    91-
    conda install -c plotly plotly=4.8.1
    91+
    conda install -c plotly plotly=4.9.0
    9292
    ```
    9393

    9494
    ### Jupyter Notebook Support
    @@ -125,20 +125,43 @@ Then run the following commands to install the required JupyterLab extensions (n
    125125

    126126
    ```
    127127
    # Basic JupyterLab renderer support
    128-
    jupyter labextension install jupyterlab-plotly@4.8.1
    128+
    jupyter labextension install jupyterlab-plotly@4.9.0
    129129
    130130
    # OPTIONAL: Jupyter widgets extension for FigureWidget support
    131-
    jupyter labextension install @jupyter-widgets/jupyterlab-manager plotlywidget@4.8.1
    131+
    jupyter labextension install @jupyter-widgets/jupyterlab-manager plotlywidget@4.9.0
    132132
    ```
    133133

    134134
    Please check out our [Troubleshooting guide](https://plotly.com/python/troubleshooting/) if you run into any problems with JupyterLab.
    135135

    136136
    ### Static Image Export
    137137

    138-
    plotly.py supports static image export using the `to_image` and `write_image`
    139-
    functions in the `plotly.io` package. This functionality requires the
    140-
    installation of the plotly [orca](https://github.com/plotly/orca) command line utility and the
    141-
    [`psutil`](https://github.com/giampaolo/psutil) Python package.
    138+
    plotly.py supports [static image export](https://plotly.com/python/static-image-export/),
    139+
    using the either the [`kaleido`](https://github.com/plotly/Kaleido)
    140+
    package (recommended, supported as of `plotly` version 4.9) or the [orca](https://github.com/plotly/orca)
    141+
    command line utility (legacy as of `plotly` version 4.9).
    142+
    143+
    #### Kaleido
    144+
    145+
    The [`kaleido`](https://github.com/plotly/Kaleido) package has no dependencies and can be installed
    146+
    using pip...
    147+
    148+
    ```
    149+
    $ pip install -U kaleido
    150+
    ```
    151+
    152+
    or conda.
    153+
    154+
    ```
    155+
    $ conda install -c plotly python-kaleido
    156+
    ```
    157+
    158+
    #### Orca
    159+
    160+
    While Kaleido is now the recommended image export approach because it is easier to install
    161+
    and more widely compatible, [static image export](https://plotly.com/python/static-image-export/)
    162+
    can also be supported
    163+
    by the legacy [orca](https://github.com/plotly/orca) command line utility and the
    164+
    [`psutil`](https://github.com/giampaolo/psutil) Python package.
    142165

    143166
    These dependencies can both be installed using conda:
    144167

    @@ -154,13 +177,6 @@ pip install psutil
    154177

    155178
    and orca can be installed according to the instructions in the [orca README](https://github.com/plotly/orca).
    156179

    157-
    #### Troubleshooting
    158-
    159-
    ##### Wrong Executable found
    160-
    161-
    If you get an error message stating that the `orca` executable that was found is not valid, this may be because another executable with the same name was found on your system. Please specify the complete path to the Plotly-Orca binary that you downloaded (for instance in the Miniconda folder) with the following command:
    162-
    163-
    `plotly.io.orca.config.executable = '/home/your_name/miniconda3/bin/orca'`
    164180

    165181
    ### Extended Geo Support
    166182

    binder/requirements.txt

    Lines changed: 2 additions & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -1,5 +1,5 @@
    11
    jupytext
    2-
    plotly==4.8.1
    2+
    plotly==4.9.0
    33
    jupyter
    44
    notebook
    55
    pandas==1.0.3
    @@ -15,3 +15,4 @@ scikit-image
    1515
    datashader
    1616
    pyarrow
    1717
    cufflinks==0.17.3
    18+
    kaleido

    contributing.md

    Lines changed: 30 additions & 15 deletions
    Original file line numberDiff line numberDiff line change
    @@ -64,7 +64,7 @@ the structure of the code and of the repository.
    6464
    https://github.com/plotly/plotly.py/issues/1965. If you have writing skills,
    6565
    the wording of existing examples can also be improved in places.
    6666

    67-
    Contributing code or documentation are not the only way to contribute! You can
    67+
    Contributing code or documentation is not the only way to contribute! You can
    6868
    also contribute to the project by
    6969

    7070
    - reporting bugs (see below).
    @@ -128,30 +128,45 @@ conda activate plotly-dev
    128128
    [conda-env]: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-with-commands
    129129
    [virtualenv]: http://docs.python-guide.org/en/latest/dev/virtualenvs/
    130130

    131-
    ### Install requirements
    131+
    ### Install requirements - (Non-Windows)
    132+
    ```bash
    133+
    (plotly_dev) $ pip install -r packages/python/plotly/requirements.txt
    134+
    (plotly_dev) $ pip install -r packages/python/plotly/optional-requirements.txt
    135+
    ```
    136+
    ### Install requirements - (Windows + Conda)
    137+
    Because Windows requires Visual Studio libraries to compile some of the optional dependencies, follow these steps to
    138+
    complete installation and avoid gdal-config errors.
    132139

    133-
    $ pip install -r packages/python/plotly/requirements.txt
    134-
    $ pip install -r packages/python/plotly/optional-requirements.txt
    140+
    ```bash
    141+
    (plotly_dev) $ pip install -r packages/python/plotly/requirements.txt
    142+
    (plotly_dev) $ conda install fiona
    143+
    (plotly_dev) $ pip install -r packages/python/plotly/optional-requirements.txt
    144+
    ```
    135145

    136146
    ### Editable install of plotly packages
    137-
    138-
    $ pip install -e packages/python/plotly/
    139-
    $ pip install -e packages/python/chart-studio/
    140-
    $ pip install -e packages/python/plotly-geo/
    141-
    147+
    ```bash
    148+
    (plotly_dev) $ pip install -e packages/python/plotly/
    149+
    (plotly_dev) $ pip install -e packages/python/chart-studio/
    150+
    (plotly_dev) $ pip install -e packages/python/plotly-geo/
    151+
    ```
    142152
    This will ensure that the installed packages links to your local development
    143153
    directory, meaning that all changes you make reflect directly in your
    144-
    environment (don't forget to restart the Jupyter kernel though!).
    154+
    environment (don't forget to restart the Jupyter kernel though!). For more
    155+
    information see the
    156+
    [`setuptools`](https://setuptools.readthedocs.io/en/latest/setuptools.html#development-mode)
    157+
    and
    158+
    [`pip`](https://pip.pypa.io/en/stable/reference/pip_install/#install-editable)
    159+
    documentation on _development mode_.
    145160

    146161
    ### ipywidgets development install
    147162

    148163
    Run the following commands in your virtual environment to use the
    149164
    development version of `FigureWidget`,
    150-
    151-
    $ jupyter nbextension enable --py widgetsnbextension
    152-
    $ jupyter nbextension install --py --symlink --sys-prefix plotlywidget
    153-
    $ jupyter nbextension enable --py --sys-prefix plotlywidget
    154-
    165+
    ```bash
    166+
    (plotly_dev) $ jupyter nbextension enable --py widgetsnbextension
    167+
    (plotly_dev) $ jupyter nbextension install --py --symlink --sys-prefix plotlywidget
    168+
    (plotly_dev) $ jupyter nbextension enable --py --sys-prefix plotlywidget
    169+
    ```
    155170
    To make plotly plots show up in JupyterLab, you also need to [install the plotly jupyterlab extensions][plotly-jl].
    156171

    157172
    [plotly-jl]: https://plot.ly/python/getting-started/#jupyterlab-support-python-35

    doc/apidoc/conf.py

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -28,7 +28,7 @@
    2828
    # The short X.Y version
    2929
    version = ""
    3030
    # The full version, including alpha/beta/rc tags
    31-
    release = "4.8.1"
    31+
    release = "4.9.0"
    3232

    3333

    3434
    # -- General configuration ---------------------------------------------------

    doc/apidoc/plotly.express.rst

    Lines changed: 1 addition & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -28,6 +28,7 @@ plotly's high-level API for rapid figure generation. ::
    2828
    line_geo
    2929
    area
    3030
    bar
    31+
    timeline
    3132
    bar_polar
    3233
    violin
    3334
    box

    doc/apidoc/plotly.figure_factory.rst

    Lines changed: 1 addition & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -18,6 +18,7 @@
    1818
    create_distplot
    1919
    create_facet_grid
    2020
    create_gantt
    21+
    create_hexbin_mapbox
    2122
    create_ohlc
    2223
    create_quiver
    2324
    create_scatterplotmatrix

    doc/apidoc/plotly.graph_objects.rst

    Lines changed: 1 addition & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -43,6 +43,7 @@ Simple Traces
    4343
    Bar
    4444
    Pie
    4545
    Heatmap
    46+
    Heatmapgl
    4647
    Image
    4748
    Contour
    4849
    Table

    doc/python/2D-Histogram.md

    Lines changed: 2 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -96,7 +96,7 @@ fig.show()
    9696

    9797
    ### 2D Histograms with Graph Objects
    9898

    99-
    To build this kind of plot without using Plotly Express, we can use the `go.Histogram2d` class.
    99+
    To build this kind of figure using [graph objects](/python/graph-objects/) without using Plotly Express, we can use the `go.Histogram2d` class.
    100100

    101101

    102102
    ### 2D Histogram of a Bivariate Normal Distribution ###
    @@ -236,4 +236,4 @@ fig.show()
    236236
    ```
    237237

    238238
    #### Reference
    239-
    See https://plotly.com/python/reference/#histogram2d for more information and chart attribute options!
    239+
    See https://plotly.com/python/reference/#histogram2d for more information and chart attribute options!

    0 commit comments

    Comments
     (0)
    0