@@ -48,8 +48,8 @@ All plotly express functions accept a `template` argument that can be set to the
48
48
49
49
``` python
50
50
import plotly.express as px
51
- gapminder = px.data.gapminder()
52
51
52
+ gapminder = px.data.gapminder()
53
53
gapminder_2007 = gapminder.query(" year==2007" )
54
54
55
55
for template in [" plotly" , " plotly_white" , " plotly_dark" , " ggplot2" , " seaborn" , " none" ]:
@@ -164,6 +164,7 @@ symbol_template.data.scatter = [
164
164
go.Scatter(marker = dict (symbol = " square" , size = 10 )),
165
165
go.Scatter(marker = dict (symbol = " circle" , size = 10 )),
166
166
]
167
+
167
168
fig = go.Figure()
168
169
fig.update_layout(template = symbol_template)
169
170
fig.add_scatter(y = [1 , 2 , 3 ], mode = " markers" , name = " first" )
@@ -188,6 +189,7 @@ import plotly.graph_objects as go
188
189
189
190
annotation_template = go.layout.Template()
190
191
annotation_template.layout.annotationdefaults = go.layout.Annotation(font = dict (color = " crimson" ))
192
+
191
193
fig = go.Figure()
192
194
fig.update_layout(
193
195
template = annotation_template,
@@ -388,6 +390,7 @@ pio.templates.default = "plotly+draft"
388
390
389
391
gapminder = px.data.gapminder()
390
392
gapminder_2007 = gapminder.query(" year==2007" )
393
+
391
394
fig = px.scatter(gapminder_2007,
392
395
x = " gdpPercap" , y = " lifeExp" , size = " pop" , color = " continent" ,
393
396
log_x = True , size_max = 60 ,
0 commit comments