mplfinance Remove Price and Volume Y-Label

November 2, 2020
import yfinance as yf
import mplfinance as mpf

ticker_name = 'MSFT'
yticker = yf.Ticker("MSFT")
data = yticker.history(period="1y") # max

# to avoid the volume notation in exponential form, such as 1e8
data['Volume'] = data['Volume'] / 1000

# ylabel is for price
# ylabel_lower is for volume
mpf.plot(data, type='candle', style='yahoo', title=f"\n{ticker_name}", volume=True, ylabel='', ylabel_lower='')

mplfinance remove y-label

This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.