This is the code I am using to plot stock price charts with mplfinance and I would like the graph to be log scaled. How can I accomplish this?
import mplfinance as mpf
# Data reading and processing steps omitted
mpf.plot(data, type='line')
Here's the solution I came up with:
import mplfinance as mpf
from matplotlib import pyplot as plt
# Data reading and processing steps omitted
fig, axlist = mpf.plot(data, type='line', returnfig=True)
ax = axlist[0]
ax.set_yscale('log')
plt.show()
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments