Hello everybody,

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:

import pylab
fig = pylab.figure()
ax = fig.add_subplot(111, label = 'plot1')
p, = ax.plot([1,2,3,4,5])
p.set_xdata([10,20,30,40,50])
# ax.set_xlim([10,50])
fig.show()

to update the xlim I have to add the commented line.

thank you very much

Eric Pellegrini



      
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to