Try using the package I created. It will be easier to use than mplfinance.
import numpy as np
import seolpyo_mplchart as mc
dates = pd.date_range(end=datetime.now(), periods=50, freq='D')
data = {
'date': dates,
'open': np.random.uniform(100, 200, len(dates)),
'high': np.random.uniform(110, 210, len(dates)),
'low': np.random.uniform(90, 190, len(dates)),
'close': np.random.uniform(95, 205, len(dates)),
'volume': np.random.randint(1000, 5000, len(dates))
}
df = pd.DataFrame(data)
class Chart(mc.OnlyChart):
def generate_data(self):
x = (self.df.loc[200 < self.df['high']].index + 0.5).to_numpy()
y = self.df.loc[200 < self.df['high'], 'high'].to_numpy()
self.ax_price.scatter(x, y)
chart = Chart()
chart.set_data(df)
mc.show(Close=True)