以下のキーエラーで困っています。
どこの文字もしくはコードが間違っているのか不明なためご指摘お願い致します。
lines = [mpf.make_addplot(df['basic_line']), mpf.make_addplot(df['turn_line']), mpf.make_addplot(df['slow_line']), ] labels = ["basic","turn","slow","span"] fig, ax = mpf.plot(df, type='candle', figsize=(16,6), style='classic', xrotation=0, addplot=lines, returnfing=True, fill_between=dict(y1=df['span1'].values, y2=df['span2'].values, alpha=0.5,color='gray'), savefig='ichimoku.png' ) ax[0].legend(labels) plt.show() コード
KeyError Traceback (most recent call last) <ipython-input-63-f189b88e84ba> in <module> 6 labels = ["basic","turn","slow","span"] 7 ----> 8 fig, ax = mpf.plot(df, type='candle', figsize=(16,6), style='classic', xrotation=0, addplot=lines, returnfing=True, 9 fill_between=dict(y1=df['span1'].values, y2=df['span2'].values, alpha=0.5,color='gray'), savefig='ichimoku.png' ) 10 ~/opt/anaconda3/lib/python3.8/site-packages/mplfinance/plotting.py in plot(data, **kwargs) 271 """ 272 --> 273 config = _process_kwargs(kwargs, _valid_plot_kwargs()) 274 275 dates,opens,highs,lows,closes,volumes = _check_and_prepare_data(data, config) ~/opt/anaconda3/lib/python3.8/site-packages/mplfinance/_arg_validators.py in _process_kwargs(kwargs, vkwargs) 230 for key in kwargs.keys(): 231 if key not in vkwargs: --> 232 raise KeyError('Unrecognized kwarg="'+str(key)+'"') 233 else: 234 value = kwargs[key] KeyError: 'Unrecognized kwarg="returnfing"' 1 コード
回答1件
あなたの回答
tips
プレビュー