5
5
text_representation :
6
6
extension : .md
7
7
format_name : markdown
8
- format_version : " 1.1 "
9
- jupytext_version : 1.2.1
8
+ format_version : ' 1.2 '
9
+ jupytext_version : 1.3.0
10
10
kernelspec :
11
11
display_name : Python 3
12
12
language : python
@@ -22,8 +22,7 @@ jupyter:
22
22
pygments_lexer : ipython3
23
23
version : 3.7.3
24
24
plotly :
25
- description :
26
- How to adjust axes properties in python. Includes examples of linear
25
+ description : How to adjust axes properties in python. Includes examples of linear
27
26
and logarithmic axes, axes titles, styling and coloring axes and grid lines,
28
27
and more.
29
28
display_as : file_settings
@@ -48,14 +47,8 @@ Here is an example of setting `showgrid` to `False` in the graph object figure c
48
47
``` python
49
48
import plotly.graph_objects as go
50
49
51
- fig = go.Figure(
52
- data = [go.Scatter(y = [1 , 0 ])],
53
- layout = go.Layout(
54
- xaxis = dict (showgrid = False ),
55
- yaxis = dict (showgrid = False ),
56
- )
57
- )
58
-
50
+ fig = go.Figure(go.Scatter(y = [1 , 0 ]))
51
+ fig.update_layout(xaxis_showgrid = False , yaxis_showgrid = False )
59
52
fig.show()
60
53
```
61
54
@@ -66,14 +59,11 @@ The lines passing through zero can be disabled as well by setting the `zeroline`
66
59
``` python
67
60
import plotly.graph_objects as go
68
61
69
- fig = go.Figure(
70
- data = [go.Scatter(y = [1 , 0 ])],
71
- layout = go.Layout(
72
- xaxis = dict (showgrid = False , zeroline = False ),
73
- yaxis = dict (showgrid = False , zeroline = False ),
74
- )
62
+ fig = go.Figure(go.Scatter(y = [1 , 0 ]))
63
+ fig.update_layout(
64
+ xaxis = dict (showgrid = False , zeroline = False ),
65
+ yaxis = dict (showgrid = False , zeroline = False ),
75
66
)
76
-
77
67
fig.show()
78
68
```
79
69
@@ -246,12 +236,12 @@ fig = go.Figure(go.Scatter(
246
236
x = [" December" , " January" , " February" ]))
247
237
248
238
fig.update_layout(
249
- xaxis = go.layout.XAxis (
239
+ xaxis = dict (
250
240
tickangle = 90 ,
251
241
title_text = " Month" ,
252
242
title_font = {" size" : 20 },
253
243
title_standoff = 25 ),
254
- yaxis = go.layout.YAxis (
244
+ yaxis = dict (
255
245
title_text = " Temperature" ,
256
246
title_standoff = 25 ))
257
247
0 commit comments