Skip to content

Commit b47f861

Browse files
look at issue#145: mouse-over y-axis numbers wrong
1 parent f35b0f1 commit b47f861

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import pandas as pd
2+
import mplfinance as mpf
3+
4+
print('\nmpf.__version__=',mpf.__version__,'\n')
5+
6+
filename = '../../data/SP500_NOV2019_IDay.csv'
7+
8+
intraday = pd.read_csv(filename,index_col=0,parse_dates=True)
9+
intraday = intraday.drop('Volume',axis=1) # Volume is zero anyway for this intraday data set
10+
intraday.index.name = 'Date'
11+
intraday.shape
12+
intraday.head(3)
13+
intraday.tail(3)
14+
15+
iday = intraday.loc['2019-11-06 15:00':'2019-11-06 16:00',:]
16+
17+
print('len(iday)=',len(iday))
18+
19+
mpf.plot(iday,type='renko',renko_params=dict(brick_size=0.1))
20+
mpf.plot(iday,type='candle')
21+
22+
filename='../../data/SP500_NOV2019_Hist.csv'
23+
df = pd.read_csv(filename,index_col=0,parse_dates=True)
24+
df.index.name = 'Date'
25+
df.shape
26+
df.head(3)
27+
df.tail(3)
28+
29+
print('len(df)=',len(df))
30+
31+
mpf.plot(df,type='candle')

0 commit comments

Comments
 (0)