Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf9ee8b1

Browse files
committed
addressed comments
1 parent8d49d2d commitf9ee8b1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

‎notebooks/histograms.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
jupyter:
33
jupytext:
4+
notebook_metadata_filter:all
45
text_representation:
56
extension:.md
67
format_name:markdown
@@ -110,7 +111,7 @@ fig.show()
110111

111112
##Histograms with go.Histogram
112113

113-
When data are not available as tidy dataframes, it is also possible to use the more generic`go.Histogram` from`plotly.graph_objs`.
114+
When data are not available as tidy dataframes, it is also possible to use the more generic`go.Histogram` from`plotly.graph_objs`. All of the available histogram options are described in the histogram section of the reference page:https://plot.ly/python/reference#histogram.
114115

115116
###Basic Histogram ###
116117

@@ -120,9 +121,8 @@ import plotly.graph_objs as go
120121
import numpyas np
121122

122123
x= np.random.randn(500)
123-
data= [go.Histogram(x=x)]
124124

125-
fig= go.Figure(data=data)
125+
fig= go.Figure(data=[go.Histogram(x=x)])
126126
fig.show()
127127
```
128128

@@ -134,8 +134,7 @@ import plotly.graph_objs as go
134134
import numpyas np
135135

136136
x= np.random.randn(500)
137-
data= [go.Histogram(x=x,
138-
histnorm='probability')]
137+
data= [go.Histogram(x=x,histnorm='probability')]
139138

140139
fig= go.Figure(data=data)
141140
fig.show()
@@ -164,6 +163,7 @@ import plotly.graph_objs as go
164163
import numpyas np
165164

166165
x0= np.random.randn(500)
166+
# Add 1 to shift the mean of the Gaussian distribution
167167
x1= np.random.randn(500)+1
168168

169169
trace0= go.Histogram(x=x0)
@@ -206,7 +206,7 @@ x1 = np.random.randn(500) + 1
206206
trace0= go.Histogram(
207207
x=x0,
208208
histnorm='percent',
209-
name='control',# name used in legend
209+
name='control',# name used in legend and hover labels
210210
xbins=dict(# bins used for histogram
211211
start=-4.0,
212212
end=3.0,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp