Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c1f240d

Browse files
authored
test
Plotly Templates Themes in graph object figures Scatter, Line, Area and Bar Charts The source code for this gist are form https://plotly.com/python/templates/
1 parent 918fd1c commit c1f240d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

‎plotly express.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import plotly.express as px
2+
import plotly.io as pio #pio.templates
3+
import plotly.graph_objects as go
4+
5+
import pandas as pd
6+
7+
8+
df = px.data.gapminder()
9+
df_2007 = df.query("year==2007")
10+
11+
for template in ["plotly", "plotly_white", "plotly_dark", "ggplot2", "seaborn", "simple_white", "none"]:
12+
fig = px.scatter(df_2007,
13+
x="gdpPercap", y="lifeExp", size="pop", color="continent",
14+
log_x=True, size_max=60,
15+
template=template, title="Gapminder 2007: '%s' theme" % template)
16+
fig.show()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /