Skip to content

7 Plotly Tutorials

Suman Kumar Pal edited this page Jan 6, 2024 · 2 revisions

Plotly Tutorials

Documentation link: https://plotly.com/python/

GitHub - https://github.com/plotly

Fundamentals

Plotly express file

Documentation link: https://plotly.com/python/plotly-express/

To import:

import plotly.express as px
import pandas as pd

Here the datasets used are from the module pd.data.

Part to Whole Charts -

Distributions -

Images and Heatmaps (.imshow, from skimage import io)

Polar Coordinates -

3D Coordinates -

Ternary Coordinates (scatter_ternary)

Bash

Plotly graph objects file

Documentation Link: https://plotly.com/python/graph-objects/

To import:

import plotly.graph_objects as go
  • Comparing Graph Objects and Plotly Express

An example of code is given below -

fig = go.Figure()
fig.add_trace(go.Bar(x=, y=, name=, hovertemplate=))
fig.update_layout(legend_title_text = "")
fig.update_xaxes(title_text = "")
fig.update_yaxes(title_text = "")
fig.show()

See this code in the file.

Basic Charts

Statistical Charts

Scientific Charts

Subplots

3D Charts

Jupyter widget interaction

Transforms

AI and ML

Animations

Add Custom Controls