GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Site
  • Page
  • « plotly.io.read_json
  • plotly.io.templates »
  • str
  • bool

This view

  • Original page
  • New address

GeezerVison is showing plotly.com — plotly.io.write_json — 7.1.0 documentation

  • Site
      • plotly.express: high-level interface for data visualization
      • plotly.graph_objects: low-level interface to figures, traces and layout
      • plotly.subplots: helper function for laying out multi-plot figures
      • plotly.figure_factory: helper methods for building specific complex charts
      • plotly.io: low-level interface for displaying, reading and writing figures
  • Page
      • plotly.io.write_json
  • « plotly.io.read_json
  • plotly.io.templates »

plotly.io.write_json¶

plotly.io.write_json(fig, file, validate=True, pretty=False, remove_uids=True, engine=None)¶

Convert a figure to JSON and write it to a file or writeable object.

Note: A figure converted to JSON with one version of Plotly.py may not be compatible with another version.

Parameters
  • fig – Figure object or dict representing a figure

  • file (str or writeable) – A string representing a local file path or a writeable object (e.g. a pathlib.Path object or an open file descriptor)

  • pretty (bool (default False)) – True if JSON representation should be pretty-printed, False if representation should be as compact as possible.

  • remove_uids (bool (default True)) – True if trace UIDs should be omitted from the JSON representation

  • engine (str (default None)) –

    The JSON encoding engine to use. One of:
    • ”json” for an engine based on the built-in Python json module

    • ”orjson” for a faster engine that requires the orjson package

    • ”auto” for the “orjson” engine if available, otherwise “json”

    If not specified, the default engine is set to the current value of plotly.io.json.config.default_engine.

Returns

Return type

None

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.