我试图更改填充形状的颜色并在左上角添加图像徽标,在右侧添加价格,但我不希望自己的价格和徽标重叠图表,有没有办法向上移动?
我的代码:
def chartBuilber(self):
df: DataFrame = pd.DataFrame.from_dict(self.priceHistory()).fillna(method="backfill")
df.set_index('Date', inplace=True)
df = df.astype(float)
market_colors = mpf.make_marketcolors(
base_mpf_style="yahoo"
)
rc = {
"axes.labelcolor": "none",
"axes.spines.bottom": True,
"axes.spines.left": False,
"axes.spines.right": False,
"axes.spines.top": False,
"font.size": 12,
}
styles = mpf.make_mpf_style(
base_mpf_style="nightclouds",
marketcolors=market_colors,
gridstyle="",
rc=rc
)
mpf.plot(df, type='line',
title='Test',
linecolor='#00ff00',
style=styles,
volume=True,
figsize=(18, 12),
figscale=0.5,
fill_between=df['Close'].values,
tight_layout=True,
scale_padding={'left': 0.5, 'top': 5, 'right': 0.7, 'bottom': 1})