The plotly Package

Plotly is an open-source, interactive graphing library for Python - Plotly GitHub repo

Reference

Installation

First install the package using Pip, if necessary:

pip install plotly

Usage

For learning purposes, prefer to construct charts using the "offline" versions which don't require a Plotly account or API key.

To display a new chart, construct it by specifying certain chart configuration options, including the type of chart (e.g. scatterplot), and the data to visualize:

the resulting chart - a boring straight line with four points

NOTE: after a few seconds, the chart will automatically open in your web browser.

Consult the documentation and examples for a variety of chart customization options.

More Examples

A pie chart example:

the resulting chart - a pie chart with four slices

Further Exploration

See also the plotly.express package, which allows you to construct graphs from pandas DataFrames.

Last updated

Was this helpful?