Hello,
I have a simple use-case, in which I try to plot additional data within the same figure as the basic Candlestick plot using addplot. Now, the requirement is to plot the additional data using a larger version of the dataframe used in the plot function, so that the additional data exceeds the candlesticks on the x axis. For example, in the code snippet below, the compact_df is a slightly shorter version of df.
tcdf = df[['LowerB','UpperB']] # DataFrame with two columns
apd = mpf.make_addplot(tcdf)
mpf.plot(compact_df,addplot=apd)
As a result I would expect something like this:

At the moment, the plot function complains about different dimensions of x and y, which I guess is the indended behaviour. My question is: Would it make sense to achieve this going the way I described and if so, how to do it?
I am pretty sure there should be an elegant solution to my problem, but I cannot seem to find anything satisfactory. Thank you for the help.
Presently mplfinance.plot() requires that the ohlc(v) dataframe, and any addplot data, be the same length.
This was done because:
mpf.plot()).make_addplot(), the index of that series or dataframe is ignored.The solution is to
nan values wherever you don't want to see dataUsing the example from the addplot notebook:
tcdf = df[['LowerB','UpperB']] # DataFrame with two columns
apd = mpf.make_addplot(tcdf)
compact_df = df.copy()
for date in compact_df.iloc[175:].index:
compact_df.loc[date,:] = [float('nan')]*9
mpf.plot(compact_df,addplot=apd)
The result:

Thanks @DanielGoldfarb. (I was trying to insert empty strings in places I didn't need the data 馃う)
@viorell91 ... ha ... i did the "same" thing too once: i inserted None (instead of nan) where I didn't want data ... took me a long time to figure out why it had "stopped working" 馃様馃お
All the best. --Daniel