Skip to content

Commit ab9f2e7

Browse files
committed
titlefont > title_font
1 parent 5151032 commit ab9f2e7

27 files changed

+101
-98
lines changed

Diff for: doc/apidoc/plotly.graph_objects.rst

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ Simple Traces
4343
Bar
4444
Pie
4545
Heatmap
46-
Heatmapgl
4746
Image
4847
Contour
4948
Table

Diff for: doc/python/3d-bubble-charts.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ fig = go.Figure(data=go.Scatter3d(
114114
))
115115

116116
fig.update_layout(width=800, height=800, title = 'Planets!',
117-
scene = dict(xaxis=dict(title='Distance from Sun', titlefont_color='white'),
118-
yaxis=dict(title='Density', titlefont_color='white'),
119-
zaxis=dict(title='Gravity', titlefont_color='white'),
117+
scene = dict(xaxis=dict(title='Distance from Sun', title_font_color='white'),
118+
yaxis=dict(title='Density', title_font_color='white'),
119+
zaxis=dict(title='Gravity', title_font_color='white'),
120120
bgcolor = 'rgb(20, 24, 54)'
121121
))
122122

@@ -155,9 +155,9 @@ fig = go.Figure(go.Scatter3d(
155155
))
156156

157157
fig.update_layout(width=800, height=800, title = 'Planets!',
158-
scene = dict(xaxis=dict(title='Distance from Sun', titlefont_color='white'),
159-
yaxis=dict(title='Density', titlefont_color='white'),
160-
zaxis=dict(title='Gravity', titlefont_color='white'),
158+
scene = dict(xaxis=dict(title='Distance from Sun', title_font_color='white'),
159+
yaxis=dict(title='Density', title_font_color='white'),
160+
zaxis=dict(title='Gravity', title_font_color='white'),
161161
bgcolor = 'rgb(20, 24, 54)'
162162
))
163163

Diff for: doc/python/bar-charts.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ fig.update_layout(
620620
xaxis_tickfont_size=14,
621621
yaxis=dict(
622622
title='USD (millions)',
623-
titlefont_size=16,
623+
title_font_size=16,
624624
tickfont_size=14,
625625
),
626626
legend=dict(

Diff for: doc/python/contour-plots.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ fig = go.Figure(data=
283283
colorbar=dict(
284284
title='Color bar title', # title here
285285
titleside='right',
286-
titlefont=dict(
286+
title_font=dict(
287287
size=14,
288288
family='Arial, sans-serif')
289289
)))

Diff for: doc/python/multiple-axes.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ fig.update_layout(
193193
),
194194
yaxis=dict(
195195
title="yaxis title",
196-
titlefont=dict(
196+
title_font=dict(
197197
color="#1f77b4"
198198
),
199199
tickfont=dict(
@@ -202,7 +202,7 @@ fig.update_layout(
202202
),
203203
yaxis2=dict(
204204
title="yaxis2 title",
205-
titlefont=dict(
205+
title_font=dict(
206206
color="#ff7f0e"
207207
),
208208
tickfont=dict(
@@ -215,7 +215,7 @@ fig.update_layout(
215215
),
216216
yaxis3=dict(
217217
title="yaxis3 title",
218-
titlefont=dict(
218+
title_font=dict(
219219
color="#d62728"
220220
),
221221
tickfont=dict(
@@ -227,7 +227,7 @@ fig.update_layout(
227227
),
228228
yaxis4=dict(
229229
title="yaxis4 title",
230-
titlefont=dict(
230+
title_font=dict(
231231
color="#9467bd"
232232
),
233233
tickfont=dict(

Diff for: doc/python/network-graphs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ node_trace.text = node_text
129129
fig = go.Figure(data=[edge_trace, node_trace],
130130
layout=go.Layout(
131131
title='<br>Network graph made with Python',
132-
titlefont_size=16,
132+
title_font_size=16,
133133
showlegend=False,
134134
hovermode='closest',
135135
margin=dict(b=20,l=5,r=5,t=40),

Diff for: doc/python/range-slider.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ fig.update_layout(
252252
tickfont={"color": "#673ab7"},
253253
tickmode="auto",
254254
ticks="",
255-
titlefont={"color": "#673ab7"},
255+
title_font={"color": "#673ab7"},
256256
type="linear",
257257
zeroline=False
258258
),
@@ -268,7 +268,7 @@ fig.update_layout(
268268
tickfont={"color": "#E91E63"},
269269
tickmode="auto",
270270
ticks="",
271-
titlefont={"color": "#E91E63"},
271+
title_font={"color": "#E91E63"},
272272
type="linear",
273273
zeroline=False
274274
),
@@ -285,7 +285,7 @@ fig.update_layout(
285285
tickmode="auto",
286286
ticks="",
287287
title="mg/L",
288-
titlefont={"color": "#795548"},
288+
title_font={"color": "#795548"},
289289
type="linear",
290290
zeroline=False
291291
),
@@ -302,7 +302,7 @@ fig.update_layout(
302302
tickmode="auto",
303303
ticks="",
304304
title="mmol/L",
305-
titlefont={"color": "#607d8b"},
305+
title_font={"color": "#607d8b"},
306306
type="linear",
307307
zeroline=False
308308
),
@@ -319,7 +319,7 @@ fig.update_layout(
319319
tickmode="auto",
320320
ticks="",
321321
title="mg/Kg",
322-
titlefont={"color": "#2196F3"},
322+
title_font={"color": "#2196F3"},
323323
type="linear",
324324
zeroline=False
325325
)

Diff for: doc/python/setting-graph-size.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ fig.update_layout(
122122
ticktext=["Very long label", "long label", "3", "label"],
123123
tickvals=[1, 2, 3, 4],
124124
tickmode="array",
125-
titlefont=dict(size=30),
125+
title_font=dict(size=30),
126126
)
127127
)
128128

@@ -157,7 +157,7 @@ fig.update_layout(
157157
ticktext=["Very long label", "long label", "3", "label"],
158158
tickvals=[1, 2, 3, 4],
159159
tickmode="array",
160-
titlefont=dict(size=30),
160+
title_font=dict(size=30),
161161
)
162162
)
163163

@@ -194,7 +194,7 @@ fig.update_layout(
194194
ticktext=["Label", "Very long label", "Other label", "Very very long label"],
195195
tickvals=[1, 2, 3, 4],
196196
tickmode="array",
197-
titlefont=dict(size=30),
197+
title_font=dict(size=30),
198198
)
199199
)
200200

Diff for: doc/python/ternary-plots.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ rawData = [
8383
def makeAxis(title, tickangle):
8484
return {
8585
'title': title,
86-
'titlefont': { 'size': 20 },
86+
'title_font': { 'size': 20 },
8787
'tickangle': tickangle,
8888
'tickfont': { 'size': 15 },
8989
'tickcolor': 'rgba(0,0,0,0)',

Diff for: doc/unconverted/python/cars-exploration.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -109,19 +109,19 @@ fig.layout.title = 'Torque and Fuel Efficience'
109109
Check default font size
110110

111111
```python
112-
fig.layout.titlefont.size
112+
fig.layout.title_font.size
113113
```
114114

115115
Increase the title font size
116116

117117
```python
118-
fig.layout.titlefont.size = 22
118+
fig.layout.title_font.size = 22
119119
```
120120

121-
Set `fig.layout.titlefont.family` to `'Rockwell'`
121+
Set `fig.layout.title_font.family` to `'Rockwell'`
122122

123123
```python
124-
fig.layout.titlefont.family = 'Rockwell'
124+
fig.layout.title_font.family = 'Rockwell'
125125
```
126126

127127
### Create New View for Figure

Diff for: packages/python/plotly/codegen/utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1277,15 +1277,15 @@ class MappedPropNode(PlotlyNode):
12771277
def __init__(self, mapped_prop_node, parent, prop_name, plotly_schema):
12781278
"""
12791279
Create node that represents a legacy title property.
1280-
e.g. layout.titlefont. These properties are now subproperties under
1280+
e.g. layout.title_font. These properties are now subproperties under
12811281
the sibling `title` property. e.g. layout.title.font.
12821282
12831283
Parameters
12841284
----------
12851285
title_node: PlotlyNode
12861286
prop_name: str
12871287
The name of the propery (without the title prefix)
1288-
e.g. 'font' to represent the layout.titlefont property.
1288+
e.g. 'font' to represent the layout.title_font property.
12891289
"""
12901290
node_path = parent.node_path + (prop_name,)
12911291
super().__init__(plotly_schema, node_path=node_path, parent=parent)

Diff for: packages/python/plotly/codegen/validators.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def write_validator_py(outdir, node: PlotlyNode):
9797
"""
9898
if node.is_mapped:
9999
# No validator written for mapped nodes
100-
# e.g. no validator for layout.titlefont since ths is mapped to
100+
# e.g. no validator for layout.title_font since ths is mapped to
101101
# layout.title.font
102102
return
103103

Diff for: packages/python/plotly/plotly/basedatatypes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4251,7 +4251,7 @@ class BasePlotlyType(object):
42514251
"""
42524252

42534253
# ### Mapped (deprecated) properties ###
4254-
# dict for deprecated property name (e.g. 'titlefont') to tuple
4254+
# dict for deprecated property name (e.g. 'title_font') to tuple
42554255
# of relative path to new property (e.g. ('title', 'font')
42564256
_mapped_properties = {}
42574257

Diff for: packages/python/plotly/plotly/graph_objs/layout/_hoverlabel.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,11 @@ def grouptitlefont(self):
236236
Sets the font for group titles in hover (unified modes).
237237
Defaults to `hoverlabel.font`.
238238
239-
The 'grouptitlefont' property is an instance of Grouptitlefont
239+
The 'grouptitlefont' property is an instance of Grouptitle_font
240240
that may be specified as:
241-
- An instance of :class:`plotly.graph_objs.layout.hoverlabel.Grouptitlefont`
241+
- An instance of :class:`plotly.graph_objs.layout.hoverlabel.Grouptitle_font`
242242
- A dict of string/value properties that will be passed
243-
to the Grouptitlefont constructor
243+
to the Grouptitle_font constructor
244244
245245
Supported dict properties:
246246
@@ -290,7 +290,7 @@ def grouptitlefont(self):
290290
291291
Returns
292292
-------
293-
plotly.graph_objs.layout.hoverlabel.Grouptitlefont
293+
plotly.graph_objs.layout.hoverlabel.Grouptitle_font
294294
"""
295295
return self["grouptitlefont"]
296296

Diff for: packages/python/plotly/plotly/graph_objs/layout/_legend.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -321,11 +321,11 @@ def grouptitlefont(self):
321321
Sets the font for group titles in legend. Defaults to
322322
`legend.font` with its size increased about 10%.
323323
324-
The 'grouptitlefont' property is an instance of Grouptitlefont
324+
The 'grouptitlefont' property is an instance of Grouptitle_font
325325
that may be specified as:
326-
- An instance of :class:`plotly.graph_objs.layout.legend.Grouptitlefont`
326+
- An instance of :class:`plotly.graph_objs.layout.legend.Grouptitle_font`
327327
- A dict of string/value properties that will be passed
328-
to the Grouptitlefont constructor
328+
to the Grouptitle_font constructor
329329
330330
Supported dict properties:
331331
@@ -375,7 +375,7 @@ def grouptitlefont(self):
375375
376376
Returns
377377
-------
378-
plotly.graph_objs.layout.legend.Grouptitlefont
378+
plotly.graph_objs.layout.legend.Grouptitle_font
379379
"""
380380
return self["grouptitlefont"]
381381

Diff for: packages/python/plotly/plotly/graph_objs/layout/hoverlabel/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
if sys.version_info < (3, 7) or TYPE_CHECKING:
55
from ._font import Font
6-
from ._grouptitlefont import Grouptitlefont
6+
from ._grouptitlefont import Grouptitle_font
77
else:
88
from _plotly_utils.importers import relative_import
99

1010
__all__, __getattr__, __dir__ = relative_import(
11-
__name__, [], ["._font.Font", "._grouptitlefont.Grouptitlefont"]
11+
__name__, [], ["._font.Font", "._grouptitlefont.Grouptitle_font"]
1212
)

Diff for: packages/python/plotly/plotly/graph_objs/layout/hoverlabel/_grouptitlefont.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import copy as _copy
33

44

5-
class Grouptitlefont(_BaseLayoutHierarchyType):
5+
class Grouptitle_font(_BaseLayoutHierarchyType):
66

77
# class properties
88
# --------------------
@@ -324,7 +324,7 @@ def __init__(
324324
**kwargs,
325325
):
326326
"""
327-
Construct a new Grouptitlefont object
327+
Construct a new Grouptitle_font object
328328
329329
Sets the font for group titles in hover (unified modes).
330330
Defaults to `hoverlabel.font`.
@@ -334,7 +334,7 @@ def __init__(
334334
arg
335335
dict of properties compatible with this constructor or
336336
an instance of :class:`plotly.graph_objs.layout.hoverla
337-
bel.Grouptitlefont`
337+
bel.Grouptitle_font`
338338
color
339339
340340
family
@@ -376,9 +376,9 @@ def __init__(
376376
377377
Returns
378378
-------
379-
Grouptitlefont
379+
Grouptitle_font
380380
"""
381-
super(Grouptitlefont, self).__init__("grouptitlefont")
381+
super(Grouptitle_font, self).__init__("grouptitlefont")
382382

383383
if "_parent" in kwargs:
384384
self._parent = kwargs["_parent"]
@@ -395,9 +395,9 @@ def __init__(
395395
else:
396396
raise ValueError(
397397
"""\
398-
The first argument to the plotly.graph_objs.layout.hoverlabel.Grouptitlefont
398+
The first argument to the plotly.graph_objs.layout.hoverlabel.Grouptitle_font
399399
constructor must be a dict or
400-
an instance of :class:`plotly.graph_objs.layout.hoverlabel.Grouptitlefont`"""
400+
an instance of :class:`plotly.graph_objs.layout.hoverlabel.Grouptitle_font`"""
401401
)
402402

403403
# Handle skip_invalid

Diff for: packages/python/plotly/plotly/graph_objs/layout/legend/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
if sys.version_info < (3, 7) or TYPE_CHECKING:
55
from ._font import Font
6-
from ._grouptitlefont import Grouptitlefont
6+
from ._grouptitlefont import Grouptitle_font
77
from ._title import Title
88
from . import title
99
else:
@@ -12,5 +12,5 @@
1212
__all__, __getattr__, __dir__ = relative_import(
1313
__name__,
1414
[".title"],
15-
["._font.Font", "._grouptitlefont.Grouptitlefont", "._title.Title"],
15+
["._font.Font", "._grouptitlefont.Grouptitle_font", "._title.Title"],
1616
)

0 commit comments

Comments
 (0)