I'm trying to plot this figure :
With this :
r_bt.longueur_groupby_section.plot(kind='barh',ylabel='Nombre de clients',xlabel='type de cable',title='longueur de conducteur en fonction de la section')
plt.legend()
plt.show()
But the ylabel is cut off..
I tried plt.autoscale()
but it does not work..
Does anybody have an idea ?
CodePudding user response:
You can adjust the spacing around matplotlib figures using the subplots_adjust() function:
import matplotlib.pyplot as plt
plt.plot(whatever)
plt.subplots_adjust(left=0.1, right=0.9, top=0.9, bottom=0.1)
increase the left value as per your need