Browse Source

Fixed docstring params

pull/116/head
Fluency 3 years ago
committed by GitHub
parent
commit
47c1116989
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 17 deletions
  1. 19
      web/update_plots.py

19
web/update_plots.py

@ -148,23 +148,8 @@ def update_file(filename, figure):
"""
Updates the file at `filename` with the plotly figure `figure`.
:param filename: The path to a JSON file containing a Plotly figure.
:type filename:
str, required.
The extension of the file must be .json or .js (for legacy reasons).
Note that if you are using JupyterLab and want to open
your updated
HTML files in an external browser window then you should save your
notebook as an HTML file instead of as a Jupyter notebook.
For more
information see this guide on [using Jupyter with Google Colab](http://jupyter-
notebook.readthedocs.io/en/stable/examples/Notebook/Running%20Code.html#Running-code).
If you are not using JupyterLab then it is recommended
that you use .html for all types of notebooks so that they can be opened in any web browser, including Chrome, Firefox and Edge on Windows and macOS
without any extra configuration needed (see below for more details). This is because some browsers do not support JavaScript which is used by default
by Plotly's exporting functions to generate
:param filename: The path to a JSON file.
:param figure: The Plotly figure.
"""
lines = read_file(filename)
f_json = figure.to_json(pretty=True).replace('\n', '\n ')

Loading…
Cancel
Save