Skip to content

Commit 2b2fa41

Browse files
author
mahdis-z
committed
hoverongaps
1 parent 3a61410 commit 2b2fa41

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

python/heatmaps.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,16 @@ fig.show()
4848

4949
### Heatmap with Categorical Axis Labels
5050

51+
In this example we also show how to ignore [hovertext](https://plot.ly/python/hover-text-and-formatting/) when we have [missing values](https://plot.ly/python/missing_values) in the data by setting the [hoverongaps](https://plot.ly/python/reference/#heatmap-hoverongaps) to False.
52+
5153
```python
5254
import plotly.graph_objects as go
5355

5456
fig = go.Figure(data=go.Heatmap(
55-
z=[[1, 20, 30, 50, 1], [20, 1, 60, 80, 30], [30, 60, 1, -10, 20]],
57+
z=[[1, None, 30, 50, 1], [20, 1, 60, 80, 30], [30, 60, 1, -10, 20]],
5658
x=['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'],
57-
y=['Morning', 'Afternoon', 'Evening']))
59+
y=['Morning', 'Afternoon', 'Evening'],
60+
hoverongaps = False))
5861
fig.show()
5962
```
6063

0 commit comments

Comments
 (0)