Skip to content

Commit 591c81c

Browse files
committed
markevery - syntax issue fixed
1 parent f4c7849 commit 591c81c

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/mplfinance/plotting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ def plot( data, **kwargs ):
532532
if ptype == 'line':
533533
lw = config['_width_config']['line_width']
534534
pmarkevery = config['markevery']
535-
axA1.plot(xdates, closes, 'o', markevery=pmarkevery, ls='-', color=config['linecolor'], linewidth=lw, ) else:
535+
axA1.plot(xdates, closes, 'o', markevery=pmarkevery, ls='-', color=config['linecolor'], linewidth=lw, )
536536
else:
537537
collections =_construct_mpf_collections(ptype,dates,xdates,opens,highs,lows,closes,volumes,config,style)
538538
if ptype in VALID_PMOVE_TYPES:

tests/test.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import pandas as pd
2+
import mplfinance as mpf
3+
df = pd.read_csv('data/SPY_20110701_20120630_Bollinger.csv',index_col=0,parse_dates=True)
4+
5+
apdict = [mpf.make_addplot(df['LowerB']),
6+
mpf.make_addplot(df['UpperB'],panel=1)]
7+
vls = pd.date_range(df.index.min(), df.index.max(), freq='D').tolist()
8+
kwargs = dict(type='candle', vlines=dict(vlines=vls[0], linewidths=0.5, colors=('r')))
9+
mpf.plot(df,volume=False,addplot=apdict,**kwargs)

0 commit comments

Comments
 (0)