Skip to content

Commit 2164784

Browse files
committed
update titles
1 parent 2f94cb2 commit 2164784

30 files changed

+154
-87
lines changed

doc/python/3d-axes.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,22 @@ fig.add_trace(go.Mesh3d(x=(70*np.random.randn(N)),
159159
))
160160

161161
fig.update_layout(scene = dict(
162-
xaxis_title='X AXIS TITLE',
163-
yaxis_title='Y AXIS TITLE',
164-
zaxis_title='Z AXIS TITLE'),
162+
xaxis=dict(
163+
title=dict(
164+
text='X AXIS TITLE'
165+
)
166+
),
167+
yaxis=dict(
168+
title=dict(
169+
text='Y AXIS TITLE'
170+
)
171+
),
172+
zaxis=dict(
173+
title=dict(
174+
text='Z AXIS TITLE'
175+
)
176+
),
177+
),
165178
width=700,
166179
margin=dict(r=20, b=10, l=10, t=10))
167180

doc/python/3d-bubble-charts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ fig = go.Figure(data=go.Scatter3d(
7777

7878

7979
fig.update_layout(height=800, width=800,
80-
title='Examining Population and Life Expectancy Over Time')
80+
title=dict(text='Examining Population and Life Expectancy Over Time'))
8181

8282
fig.show()
8383
```
@@ -116,7 +116,7 @@ fig = go.Figure(data=go.Scatter3d(
116116
fig.update_layout(
117117
width=800,
118118
height=800,
119-
title="Planets!",
119+
title=dict(text="Planets!"),
120120
scene=dict(
121121
xaxis=dict(
122122
title=dict(

doc/python/3d-camera-controls.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ z_data = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/a
5353

5454
fig = go.Figure(data=go.Surface(z=z_data, showscale=False))
5555
fig.update_layout(
56-
title='Mt Bruno Elevation',
56+
title=dict(text='Mt Bruno Elevation'),
5757
width=400, height=400,
5858
margin=dict(t=40, r=0, l=20, b=20)
5959
)
@@ -85,7 +85,7 @@ z_data = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/a
8585

8686
fig = go.Figure(data=go.Surface(z=z_data, showscale=False))
8787
fig.update_layout(
88-
title='Mt Bruno Elevation',
88+
title=dict(text='Mt Bruno Elevation'),
8989
width=400, height=400,
9090
margin=dict(t=30, r=0, l=20, b=10)
9191
)
@@ -112,7 +112,7 @@ z_data = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/a
112112

113113
fig = go.Figure(data=go.Surface(z=z_data, showscale=False))
114114
fig.update_layout(
115-
title='Mt Bruno Elevation',
115+
title=dict(text='Mt Bruno Elevation'),
116116
width=400, height=400,
117117
margin=dict(t=30, r=0, l=20, b=10)
118118
)
@@ -138,7 +138,7 @@ z_data = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/a
138138

139139
fig = go.Figure(data=go.Surface(z=z_data, showscale=False))
140140
fig.update_layout(
141-
title='Mt Bruno Elevation',
141+
title=dict(text='Mt Bruno Elevation'),
142142
width=400, height=400,
143143
margin=dict(t=30, r=0, l=20, b=10)
144144
)
@@ -163,7 +163,7 @@ z_data = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/a
163163

164164
fig = go.Figure(data=go.Surface(z=z_data, showscale=False))
165165
fig.update_layout(
166-
title='Mt Bruno Elevation',
166+
title=dict(text='Mt Bruno Elevation'),
167167
width=400, height=400,
168168
margin=dict(t=30, r=0, l=20, b=10)
169169
)
@@ -189,7 +189,7 @@ z_data = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/a
189189

190190
fig = go.Figure(data=go.Surface(z=z_data, showscale=False))
191191
fig.update_layout(
192-
title='Mt Bruno Elevation',
192+
title=dict(text='Mt Bruno Elevation'),
193193
width=400, height=400,
194194
margin=dict(t=30, r=0, l=20, b=10)
195195
)
@@ -216,7 +216,7 @@ z_data = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/a
216216

217217
fig = go.Figure(data=go.Surface(z=z_data, showscale=False))
218218
fig.update_layout(
219-
title='Mt Bruno Elevation',
219+
title=dict(text='Mt Bruno Elevation'),
220220
width=400, height=400,
221221
margin=dict(t=30, r=0, l=20, b=10)
222222
)
@@ -243,7 +243,7 @@ z_data = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/a
243243

244244
fig = go.Figure(data=go.Surface(z=z_data, showscale=False))
245245
fig.update_layout(
246-
title='Mt Bruno Elevation',
246+
title=dict(text='Mt Bruno Elevation'),
247247
width=400, height=400,
248248
margin=dict(t=30, r=0, l=20, b=10)
249249
)
@@ -273,7 +273,7 @@ z_data = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/a
273273

274274
fig = go.Figure(data=go.Surface(z=z_data, showscale=False))
275275
fig.update_layout(
276-
title='Mt Bruno Elevation',
276+
title=dict(text='Mt Bruno Elevation'),
277277
width=400, height=400,
278278
margin=dict(t=25, r=0, l=20, b=30)
279279
)

doc/python/3d-mesh.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ fig = go.Figure(data=[
9797
x=[0, 1, 2, 0],
9898
y=[0, 0, 1, 2],
9999
z=[0, 2, 0, 1],
100-
colorbar_title='z',
100+
colorbar=dict(title=dict(text='z')),
101101
colorscale=[[0, 'gold'],
102102
[0.5, 'mediumturquoise'],
103103
[1, 'magenta']],
@@ -128,7 +128,7 @@ fig = go.Figure(data=[
128128
x=[0, 0, 1, 1, 0, 0, 1, 1],
129129
y=[0, 1, 1, 0, 0, 1, 1, 0],
130130
z=[0, 0, 0, 0, 1, 1, 1, 1],
131-
colorbar_title='z',
131+
colorbar=dict(title=dict(text='z')),
132132
colorscale=[[0, 'gold'],
133133
[0.5, 'mediumturquoise'],
134134
[1, 'magenta']],
@@ -160,7 +160,7 @@ fig = go.Figure(data=[
160160
x=[0, 0, 1, 1, 0, 0, 1, 1],
161161
y=[0, 1, 1, 0, 0, 1, 1, 0],
162162
z=[0, 0, 0, 0, 1, 1, 1, 1],
163-
colorbar_title='z',
163+
colorbar=dict(title=dict(text='z')),
164164
colorscale=[[0, 'gold'],
165165
[0.5, 'mediumturquoise'],
166166
[1, 'magenta']],

doc/python/3d-surface-plots.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ z_data = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/a
4646

4747
fig = go.Figure(data=[go.Surface(z=z_data.values)])
4848

49-
fig.update_layout(title='Mt Bruno Elevation', autosize=False,
49+
fig.update_layout(title=dict(text='Mt Bruno Elevation'), autosize=False,
5050
width=500, height=500,
5151
margin=dict(l=65, r=50, b=65, t=90))
5252

@@ -67,7 +67,7 @@ z = z_data.values
6767
sh_0, sh_1 = z.shape
6868
x, y = np.linspace(0, 1, sh_0), np.linspace(0, 1, sh_1)
6969
fig = go.Figure(data=[go.Surface(z=z, x=x, y=y)])
70-
fig.update_layout(title='Mt Bruno Elevation', autosize=False,
70+
fig.update_layout(title=dict(text='Mt Bruno Elevation'), autosize=False,
7171
width=500, height=500,
7272
margin=dict(l=65, r=50, b=65, t=90))
7373
fig.show()
@@ -90,7 +90,7 @@ z_data = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/a
9090
fig = go.Figure(data=[go.Surface(z=z_data.values)])
9191
fig.update_traces(contours_z=dict(show=True, usecolormap=True,
9292
highlightcolor="limegreen", project_z=True))
93-
fig.update_layout(title='Mt Bruno Elevation', autosize=False,
93+
fig.update_layout(title=dict(text='Mt Bruno Elevation'), autosize=False,
9494
scene_camera_eye=dict(x=1.87, y=0.88, z=-0.64),
9595
width=500, height=500,
9696
margin=dict(l=65, r=50, b=65, t=90)

doc/python/animations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ fig = go.Figure(
126126
layout=go.Layout(
127127
xaxis=dict(range=[0, 5], autorange=False),
128128
yaxis=dict(range=[0, 5], autorange=False),
129-
title="Start Title",
129+
title=dict(text="Start Title"),
130130
updatemenus=[dict(
131131
type="buttons",
132132
buttons=[dict(label="Play",
@@ -240,7 +240,7 @@ fig = go.Figure(
240240
layout=go.Layout(width=600, height=600,
241241
xaxis=dict(range=[xm, xM], autorange=False, zeroline=False),
242242
yaxis=dict(range=[ym, yM], autorange=False, zeroline=False),
243-
title="Moving Frenet Frame Along a Planar Curve",
243+
title=dict(text="Moving Frenet Frame Along a Planar Curve"),
244244
hovermode="closest",
245245
updatemenus=[dict(type="buttons",
246246
buttons=[dict(label="Play",

doc/python/axes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,8 +649,8 @@ import plotly.express as px
649649
df = px.data.stocks(indexed=True)
650650

651651
fig = px.line(df, df.index, y="GOOG")
652-
fig.update_yaxes(ticklabelposition="inside", title="Price")
653-
fig.update_xaxes(insiderange=['2018-10-01', '2019-01-01'], title="Date")
652+
fig.update_yaxes(ticklabelposition="inside", title=dict(text="Price"))
653+
fig.update_xaxes(insiderange=['2018-10-01', '2019-01-01'], title=dict(text="Date"))
654654

655655
fig.show()
656656
```

doc/python/bar-charts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ fig.add_trace(go.Bar(x=years,
616616
))
617617

618618
fig.update_layout(
619-
title='US Export of Plastic Scrap',
619+
title=dict(text='US Export of Plastic Scrap'),
620620
xaxis_tickfont_size=14,
621621
yaxis=dict(
622622
title=dict(

doc/python/box-plots.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,10 @@ fig.add_trace(go.Box(
367367
))
368368

369369
fig.update_layout(
370-
yaxis_title='normalized moisture',
370+
yaxis=dict(
371+
title=dict(
372+
text='normalized moisture')
373+
),
371374
boxmode='group' # group together boxes of the different traces for each value of x
372375
)
373376
fig.show()
@@ -402,7 +405,7 @@ fig.add_trace(go.Box(
402405
))
403406

404407
fig.update_layout(
405-
xaxis=dict(title='normalized moisture', zeroline=False),
408+
xaxis=dict(title=dict(text='normalized moisture'), zeroline=False),
406409
boxmode='group'
407410
)
408411

@@ -479,7 +482,7 @@ for xd, yd, cls in zip(x_data, y_data, colors):
479482
)
480483

481484
fig.update_layout(
482-
title='Points Scored by the Top 9 Scoring NBA Players in 2012',
485+
title=dict(text='Points Scored by the Top 9 Scoring NBA Players in 2012'),
483486
yaxis=dict(
484487
autorange=True,
485488
showgrid=True,

doc/python/bubble-charts.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,15 +202,15 @@ fig.update_traces(mode='markers', marker=dict(sizemode='area',
202202
sizeref=sizeref, line_width=2))
203203

204204
fig.update_layout(
205-
title='Life Expectancy v. Per Capita GDP, 2007',
205+
title=dict(text='Life Expectancy v. Per Capita GDP, 2007'),
206206
xaxis=dict(
207-
title='GDP per capita (2000 dollars)',
207+
title=dict(text='GDP per capita (2000 dollars)'),
208208
gridcolor='white',
209209
type='log',
210210
gridwidth=2,
211211
),
212212
yaxis=dict(
213-
title='Life Expectancy (years)',
213+
title=dict(text='Life Expectancy (years)'),
214214
gridcolor='white',
215215
gridwidth=2,
216216
),

0 commit comments

Comments
 (0)