Skip to content

Commit 065ca0e

Browse files
authored
document spikes (#174)
1 parent 5a83e13 commit 065ca0e

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

python/3d-axes.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jupyter:
2020
name: python
2121
nbconvert_exporter: python
2222
pygments_lexer: ipython3
23-
version: 3.6.7
23+
version: 3.7.3
2424
plotly:
2525
description: How to format axes of 3d plots in Python with Plotly.
2626
display_as: 3d_charts
@@ -207,3 +207,25 @@ fig.update_layout(scene = dict(
207207
)
208208
fig.show()
209209
```
210+
211+
### Disabling tooltip spikes
212+
213+
By default, guidelines originating from the tooltip point are drawn. It is possible to disable this behaviour with the `showspikes` parameter. In this example we only keep the `z` spikes (projection of the tooltip on the `x-y` plane). Hover on the data to show this behaviour.
214+
215+
```python
216+
import plotly.graph_objects as go
217+
import numpy as np
218+
219+
N = 50
220+
fig = go.Figure(data=[go.Mesh3d(x=(30*np.random.randn(N)),
221+
y=(25*np.random.randn(N)),
222+
z=(30*np.random.randn(N)),
223+
opacity=0.5,)])
224+
fig.update_layout(scene=dict(xaxis_showspikes=False,
225+
yaxis_showspikes=False))
226+
fig.show()
227+
```
228+
229+
```python
230+
231+
```

0 commit comments

Comments
 (0)