Create beautiful visualizations using our in-app Plotly support. Plotly support works just as you're used to in Python, displaying your chart straight to the spreadsheet.
Getting started
Building charts in Quadratic is centered around Python charting libraries, starting with Plotly. Building charts in Plotly is broken down into 3 simple steps:
# import plotly
import plotly.express as px
# replace this df with your data
df = px.data.gapminder().query("country=='Canada'")
# create your chart type, for more chart types: https://plotly.com/python/
fig = px.line(df, x="year", y="lifeExp", title='Life expectancy in Canada')
# make chart prettier
fig.update_layout(
plot_bgcolor="White",
)
# display chart
fig.show()
Bar charts
import plotly.express as px
# replace this df with your data
df = px.data.gapminder().query("country == 'Canada'")
# create your chart type, for more chart types: https://plotly.com/python/
fig = px.bar(df, x='year', y='pop')
# make chart prettier
fig.update_layout(
plot_bgcolor="White",
)
# display chart
fig.show()
Histograms
# Import Plotly
import plotly.express as px
# Create figure - replace df with your data
fig = px.histogram(df, x = 'output')
# Display to sheet
fig.show()
Scatter plots
import plotly.express as px
# replace df, x, and y and color with your data
fig = px.scatter(df, x="col1", y="col2", color="col3")
fig.update_traces(marker_size=10)
fig.update_layout(scattermode="group")
fig.show()
Heatmaps
# Import library
import plotly.express as px
# Assumes 2d array Z
fig = px.imshow(Z, text_auto=True)
# Display chart
fig.show()