Skip to content

Commit 5aafb5d

Browse files
plotlyplotly
authored andcommitted
coloraxis added
1 parent f39d0ca commit 5aafb5d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

doc/python/2D-Histogram.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ jupyter:
55
text_representation:
66
extension: .md
77
format_name: markdown
8-
format_version: '1.1'
9-
jupytext_version: 1.1.1
8+
format_version: '1.2'
9+
jupytext_version: 1.3.0
1010
kernelspec:
1111
display_name: Python 3
1212
language: python
@@ -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.5
2424
plotly:
2525
description: How to make 2D Histograms in Python with Plotly.
2626
display_as: statistical
@@ -76,24 +76,29 @@ This example shows how to use [bingroup](https://plot.ly/python/reference/#histo
7676
```python
7777
import plotly.graph_objects as go
7878
from plotly.subplots import make_subplots
79+
7980
fig = make_subplots(2,2)
8081
fig.add_trace(go.Histogram2d(
8182
x = [ 1, 2, 2, 3, 4 ],
8283
y = [ 1, 2, 2, 3, 4 ],
84+
coloraxis = "coloraxis",
8385
xbins = {'start':1, 'size':1}), 1,1)
8486
fig.add_trace(go.Histogram2d(
8587
x = [ 4, 5, 5, 5, 6 ],
8688
y = [ 4, 5, 5, 5, 6 ],
89+
coloraxis = "coloraxis",
8790
ybins = {'start': 3, 'size': 1}),1,2)
8891
fig.add_trace(go.Histogram2d(
8992
x = [ 1, 2, 2, 3, 4 ],
9093
y = [ 1, 2, 2, 3, 4 ],
9194
bingroup = 1,
95+
coloraxis = "coloraxis",
9296
xbins = {'start':1, 'size':1}), 2,1)
9397
fig.add_trace(go.Histogram2d(
9498
x = [ 4, 5, 5, 5, 6 ],
9599
y = [ 4, 5, 5, 5, 6 ],
96100
bingroup = 1,
101+
coloraxis = "coloraxis",
97102
ybins = {'start': 3, 'size': 1}),2,2)
98103
fig.show()
99104
```
@@ -166,4 +171,3 @@ fig.show()
166171

167172
#### Reference
168173
See https://plot.ly/python/reference/#histogram2d for more information and chart attribute options!
169-

0 commit comments

Comments
 (0)