I have a plot in matplotlib and I would like to resize automatically the xlim
based on the view fixed by ylim
. How to do that ?
Currently I write :
plt.ylim(0, 10)
And the problem occurs when I have a set of data that goes from y=0
to y=20
, then the xlim
remain unchanged : I would like to have it automatically rescaled for the view corresponding to plt.ylim(0, 10)
.