Skip to content

Commit

Permalink
look at issue#145: mouse-over y-axis numbers wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielGoldfarb committed Jun 3, 2020
1 parent f35b0f1 commit b47f861
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions examples/scratch_pad/issues/issue145.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import pandas as pd
import mplfinance as mpf

print('\nmpf.__version__=',mpf.__version__,'\n')

filename = '../../data/SP500_NOV2019_IDay.csv'

intraday = pd.read_csv(filename,index_col=0,parse_dates=True)
intraday = intraday.drop('Volume',axis=1) # Volume is zero anyway for this intraday data set
intraday.index.name = 'Date'
intraday.shape
intraday.head(3)
intraday.tail(3)

iday = intraday.loc['2019-11-06 15:00':'2019-11-06 16:00',:]

print('len(iday)=',len(iday))

mpf.plot(iday,type='renko',renko_params=dict(brick_size=0.1))
mpf.plot(iday,type='candle')

filename='../../data/SP500_NOV2019_Hist.csv'
df = pd.read_csv(filename,index_col=0,parse_dates=True)
df.index.name = 'Date'
df.shape
df.head(3)
df.tail(3)

print('len(df)=',len(df))

mpf.plot(df,type='candle')

0 comments on commit b47f861

Please sign in to comment.