Skip to content

Commit 53aeb53

Browse files
tickson
1 parent 39c9052 commit 53aeb53

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

python/tick-formatting.md

+20
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,26 @@ fig.update_layout(
176176
fig.show()
177177
```
178178

179+
#### Placing ticks and gridlines between categories
180+
181+
```python
182+
import plotly.graph_objects as go
183+
184+
fig = go.Figure(go.Bar(
185+
x = ["apples", "oranges", "pears"],
186+
y = [1, 2, 3]
187+
))
188+
189+
fig.update_xaxes(
190+
showgrid=True,
191+
ticks="outside",
192+
tickson="boundaries",
193+
ticklen=20
194+
)
195+
196+
fig.show()
197+
```
198+
179199
#### Reference
180200
See https://plot.ly/python/reference/#layout-xaxis for more information and chart attribute options!
181201

0 commit comments

Comments
 (0)