5
5
text_representation :
6
6
extension : .md
7
7
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
10
10
kernelspec :
11
11
display_name : Python 3
12
12
language : python
@@ -20,7 +20,7 @@ jupyter:
20
20
name : python
21
21
nbconvert_exporter : python
22
22
pygments_lexer : ipython3
23
- version : 3.6.7
23
+ version : 3.7.5
24
24
plotly :
25
25
description : How to make 2D Histograms in Python with Plotly.
26
26
display_as : statistical
@@ -76,24 +76,29 @@ This example shows how to use [bingroup](https://plot.ly/python/reference/#histo
76
76
``` python
77
77
import plotly.graph_objects as go
78
78
from plotly.subplots import make_subplots
79
+
79
80
fig = make_subplots(2 ,2 )
80
81
fig.add_trace(go.Histogram2d(
81
82
x = [ 1 , 2 , 2 , 3 , 4 ],
82
83
y = [ 1 , 2 , 2 , 3 , 4 ],
84
+ coloraxis = " coloraxis" ,
83
85
xbins = {' start' :1 , ' size' :1 }), 1 ,1 )
84
86
fig.add_trace(go.Histogram2d(
85
87
x = [ 4 , 5 , 5 , 5 , 6 ],
86
88
y = [ 4 , 5 , 5 , 5 , 6 ],
89
+ coloraxis = " coloraxis" ,
87
90
ybins = {' start' : 3 , ' size' : 1 }),1 ,2 )
88
91
fig.add_trace(go.Histogram2d(
89
92
x = [ 1 , 2 , 2 , 3 , 4 ],
90
93
y = [ 1 , 2 , 2 , 3 , 4 ],
91
94
bingroup = 1 ,
95
+ coloraxis = " coloraxis" ,
92
96
xbins = {' start' :1 , ' size' :1 }), 2 ,1 )
93
97
fig.add_trace(go.Histogram2d(
94
98
x = [ 4 , 5 , 5 , 5 , 6 ],
95
99
y = [ 4 , 5 , 5 , 5 , 6 ],
96
100
bingroup = 1 ,
101
+ coloraxis = " coloraxis" ,
97
102
ybins = {' start' : 3 , ' size' : 1 }),2 ,2 )
98
103
fig.show()
99
104
```
@@ -166,4 +171,3 @@ fig.show()
166
171
167
172
#### Reference
168
173
See https://plot.ly/python/reference/#histogram2d for more information and chart attribute options!
169
-
0 commit comments