I am trying to plot multiple features which have different ranges on two y axis. Each axis might contain more than one feature. Code snippet below includes object "Prin Balances" which is a df which contains datatypes float indexed by dates. "Delinquent States" is a list containing a subset of the column headers of Prin Balances.
Delinquent_States = ['1 Mos','2 Mos','3 Mos','> 3 Mos']
fig, ax = plt.subplots()
plt.plot(Prin_Balances['UPB'], '--r', label='UPB')
plt.legend()
ax.tick_params('Bal', colors='r')
# Get second axis
ax2 = ax.twinx()
plt.plot(Prin_Balances[Delinquent_States], label=Delinquent_States)
plt.legend()
ax.tick_params('vals', colors='b')
My output needs to be cleaned up, esp the legends.
Any suggestions welcomed.



