I need to get two line charts & bar chart in same diagram. Both line charts have the same y axis, but the bar chart has a different axis.
Table format
Indicator Name 2011 2012 2013 2014 2015 2016 2017 2018 2019
Bank nonperforming loans to total gross loans (%) 3.8 3.6 5.5 4.2 3.2 2.6 2.4 3.4 4.2
Bank nonperforming loans to total net loans (%) 3 2.2 3.8 2.6 1.2 1.7 1.3 2.2 2.5
Bank Total gross loans ( LK Bn) 99 116.6 191 165 152.8 142.3 160.7 263.1 275.5
This is my code:
df.loc['Bank nonperforming loans to total gross loans (%)', years].plot(kind = 'line',color='mediumvioletred',marker ='o',
markerfacecolor ='blue',markersize=9,label = "NPL %")
df.loc['Bank nonperforming loans to total net loans (%)', years].plot(kind = 'line',color='blue',label = "SL")
plt.twinx()
df.loc['Bank Total gross loans (LK Bn)', years].plot(kind = 'Bar',color='brown',label = "chk")
plt.ylim([90,280])
plt.title('Immigration from Afghanistan')
plt.ylabel('NPL %')
plt.xlabel('years')
plt.legend()
Below is the graph that I get, but it doesn't show the bar graph.