这是我使用 mplfinance 绘制股票价格图表的代码,我希望图表按对数比例缩放。我怎样才能做到这一点?
import mplfinance as mpf
# Data reading and processing steps omitted
mpf.plot(data, type='line')
最佳答案
这是我想出的解决方案:
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()
关于python - mplfinance 是否有对数刻度设置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64721265/