Hello I am trying to place a text right outside the graph where y = -100
is. The thing is the graph y and x values always change depending on the different numbers inputted within the code. A purple line is drawn at y= -100.
#Tittle, ylable, xlable
plt.title('PnL in Accordense to Number of Trades', fontdict={'fontsize': 12})
plt.ylabel('PnL of the asset')
plt.xlabel('Number of trades')
#Plotting the PnL, Max_profit, Max_drawdown
PnL = plt.bar(x_indexes,bar_positions,width =width_bar, label= 'PnL')
Maximum_Profits = plt.bar(x_indexes+width_bar,Max_profit,width =width_bar, label= 'Max Upside', color ='green')
Maximum_Drawdown = plt.bar(x_indexes+width_bar*2,Max_drawdown,width =width_bar, label= 'Max Drawdown', color='red')
plt.axhline(-100, color = 'purple', linewidth =1.4, linestyle='--')