Run Plotly Online
Write Plotly code in Python and get an interactive chart you can hover, zoom and pan, with nothing to install. Plotly Express, graph_objects, pandas and NumPy are ready in the online editor: call fig.show() and the chart opens next to your code.
How it works
- fig.show() opens the chartEach figure appears in a window with Plotly's toolbar: hover for values, zoom, pan, and download a PNG.
- Plotly Express and graph_objectspx.line, px.scatter, px.bar, px.histogram, px.pie, or build a go.Figure trace by trace.
- Save the chartDownload it as an HTML file from the chart window, or call fig.write_html("chart.html") to save it in your workspace.
- Your own dataThe editor has no internet access, so build your DataFrame in code or upload a CSV to your workspace.
Line chart from a DataFrame
Plotly Express takes a DataFrame and column names: color= draws one line per store and markers=True marks each month. Hover over a point to see its value.
import pandas as pd
import plotly.express as px
df = pd.DataFrame({
"month": ["Jan", "Feb", "Mar", "Apr", "May", "Jun"] * 2,
"sales": [120, 135, 150, 145, 170, 190, 90, 110, 105, 130, 150, 160],
"store": ["North"] * 6 + ["South"] * 6,
})
fig = px.line(df, x="month", y="sales", color="store", markers=True, title="Monthly sales")
fig.show()
Bubble chart with hover data
size= sets each bubble from a column, log_x=True uses a log scale, and hover_data adds columns to the tooltip.
import numpy as np
import pandas as pd
import plotly.express as px
rng = np.random.default_rng(4)
df = pd.DataFrame({
"gdp_per_capita": rng.uniform(2_000, 60_000, 40).round(),
"life_expectancy": rng.uniform(60, 84, 40).round(1),
"population_m": rng.uniform(1, 300, 40).round(1),
"region": rng.choice(["Americas", "Europe", "Asia", "Africa"], 40),
})
fig = px.scatter(df, x="gdp_per_capita", y="life_expectancy", size="population_m", color="region",
log_x=True, hover_data=["population_m"], title="Hover over a bubble")
fig.show()
Grouped bar chart with graph_objects
go.Figure gives full control: add one trace per year, then group the bars and name the axes in update_layout.
import plotly.graph_objects as go
languages = ["Python", "JavaScript", "Java", "C#", "C++"]
fig = go.Figure()
fig.add_trace(go.Bar(name="2025", x=languages, y=[48, 62, 30, 27, 23]))
fig.add_trace(go.Bar(name="2026", x=languages, y=[52, 60, 29, 28, 24]))
fig.update_layout(barmode="group", title="Language usage (%)", yaxis_title="% of developers")
fig.show()
More plotting pages
Frequently asked questions
Can I run Plotly online?
Yes. Plotly is installed in the online Matplotlib editor. Write your code, call fig.show(), and an interactive chart opens next to the code.
Are the charts interactive?
Yes. You can hover for values, zoom, pan, toggle traces in the legend and download a PNG from Plotly's toolbar.
Does Plotly Express work?
Yes: px.line, px.scatter, px.bar, px.histogram, px.pie and the rest, as well as plotly.graph_objects.
How do I save a Plotly chart?
Use the Download button in the chart window to get an HTML file, or call fig.write_html("chart.html") to save it in your workspace. PNG export with fig.write_image is not available.
Can I load data from the internet?
No, code runs without internet access. Build the DataFrame in code or upload a CSV to your workspace.