回答編集履歴

2

x軸の尺度変更

2021/01/25 07:39

投稿

chgrios
chgrios

スコア70

test CHANGED
@@ -2,13 +2,13 @@
2
2
 
3
3
  model_kde = stats.kde.gaussian_kde(data.values.ravel())
4
4
 
5
- x = np.linspace(data.min(),data.max(),num=10000)
5
+ x = np.linspace(data.min(),data.max(),num=len(data))
6
6
 
7
7
  total_gold_kde = model_kde(x)
8
8
 
9
9
  plt.plot(total_gold_kde)
10
10
 
11
- plt.vlines(signal.argrelmin(total_gold_kde),0,0.00040)
11
+ plt.vlines(x[signal.argrelmin(total_gold_kde]),0,0.00040)
12
12
 
13
13
 
14
14
 
@@ -20,4 +20,4 @@
20
20
 
21
21
  ```
22
22
 
23
- ![![イメージ説明](c70c1ed9611782c78d0870b91f35b6c9.png)](d7dc5ba54a5f449249d5fe959b58c444.png)
23
+ ![![イメージ説明](c70c1ed9611782c78d0870b91f35b6c9.png)

1

plot例を追加

2021/01/25 07:39

投稿

chgrios
chgrios

スコア70

test CHANGED
@@ -8,12 +8,16 @@
8
8
 
9
9
  plt.plot(total_gold_kde)
10
10
 
11
+ plt.vlines(signal.argrelmin(total_gold_kde),0,0.00040)
12
+
11
13
 
12
14
 
13
15
  from scipy import signal
14
16
 
15
- # signal.argrelmax(nparam_density)
16
-
17
17
  signal.argrelmin(total_gold_kde),signal.argrelmax(total_gold_kde)
18
18
 
19
+
20
+
19
21
  ```
22
+
23
+ ![![イメージ説明](c70c1ed9611782c78d0870b91f35b6c9.png)](d7dc5ba54a5f449249d5fe959b58c444.png)