From: Mike K. <mc...@gm...> - 2011-02-08 01:20:32
|
using a recent svn (r8900), I've noticed that after starting from a regular python shell: >>> import matplotlib.pyplot as plt >>> plt.isinteractive() False >>> plt.plot([1,2,3],[1,3,2]) [<matplotlib.lines.Line2D object at 0x114e7a090>] >>> plt.plot([1,2,3],[1,2,3]) [<matplotlib.lines.Line2D object at 0x114e7a590>] # plt.draw() is not required, the figure pops up # and both plots are shown >>> plt.xlim(1,2) (1, 2) # again this works immediately no draw() required >>> plt.xlabel('aaa') <matplotlib.text.Text object at 0x1033a2290> # ditto, no draw() required but if the axes methods are used, then interactive status is honored: >>> plt.gca().set_xlabel('bbb') <matplotlib.text.Text object at 0x1033a2290> >>> plt.gca().plot([1,2,3],[3,2,1]) [<matplotlib.lines.Line2D object at 0x114e7cf90>] >>> plt.gca().set_xlim(1,3) (1, 3) # all these require a plt.draw() to show up... I think that this is a misfeature, but maybe this is desired behavior? M |