I would like to create a plot from which I set the x data later. The method set_xdata works but the corresponding plot displays the initial x limits. Is it possible to update the plot automatically in order that the displayed plot has x limits corresponding to the newly set x data ?
Here is the script that fails:
fig = pylab.figure()
ax = fig.add_subplot(111, label = ‘plot1’)
p, = ax.plot([1,2,3,4,5])
to update the xlim I have to add the commented line.
thank you very much