質問編集履歴
2
修正
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
plotlyで複数のローソク足を
|
1
|
+
plotlyのsubplotで複数のローソク足を描画する方法について
|
test
CHANGED
@@ -1,61 +1,29 @@
|
|
1
|
-
plotlyのsubplotを利用して複数のローソク足を
|
1
|
+
plotlyのsubplotを利用して同時に複数のローソク足をレンジスライダーなしで表示したいのです。
|
2
2
|
|
3
|
-
ただrangesliderが邪魔なので非表示にしようとしましたが、非表示ならなくて困っています。
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
3
|
+
ですが、下記コードだと上手くいきません。
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
よろしくお願い致します。
|
12
4
|
|
13
5
|
|
14
6
|
|
15
7
|
```
|
16
8
|
|
17
|
-
for
|
9
|
+
for i in range(2):
|
10
|
+
|
11
|
+
trace= ploty.Candlestick(x=df.index,df.open,df.hi,df.low,df.close)
|
12
|
+
|
13
|
+
layout = go.Layout(xaxis = dict(rangeslider = dict(visible = False)))
|
18
14
|
|
19
15
|
|
20
16
|
|
21
|
-
|
17
|
+
data = [trace]
|
22
18
|
|
19
|
+
fig = tools.make_subplots(rows=2, cols=1)
|
23
20
|
|
21
|
+
fig = go.Figure(data=data,layout=layout)
|
24
22
|
|
25
|
-
tky = data_price[time(6,0):time(15,59)]
|
26
|
-
|
27
|
-
ldn = data_price[time(16,0):time(21,59)]
|
28
|
-
|
29
|
-
ny = data_price[time(22,0):time(5,59)]
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
list_market = [tky,ldn,ny]
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
for lmindex,lm in enumerate(list_market):
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
M15 = lm.close.resample('15T').ohlc()
|
42
|
-
|
43
|
-
trace = go.Candlestick(x=M15.index,open=M15.open,high=M15.high,low=M15.low,close=M15.close)
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
layout = go.Layout(xaxis=dict(rangeslider=dict(visible=False)))
|
48
|
-
|
49
|
-
|
23
|
+
fig.append_trace(trace,i,1)
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
fig = go.Figure(data=fig,layout=layout)
|
54
|
-
|
55
|
-
fig['layout'].update(height=1600, width=1900)
|
56
|
-
|
57
|
-
plotly.offline.plot(fig,filename='test.html')
|
58
24
|
|
59
25
|
|
60
26
|
|
61
27
|
```
|
28
|
+
|
29
|
+
解決策ありましたら、よろしくお願いします。
|
1
修正
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|