From: John H. <jdh...@ac...> - 2004-12-01 21:26:46
|
>>>>> "Gregory" == Gregory Lielens <gre...@ff...> writes: Gregory> I though that calling draw() would update the active Gregory> figure without starting the mainloop already, or am I Gregory> confused? Alternatively, in the fltk backend, I have Gregory> allowed calling show() multiple times, it just check Gregory> before running the mainloop that it is not already Gregory> running...Maybe this is also feasible in a more general Gregory> way? The matlab interface draw function does not need the renderer passed as an arg (the FigureCanvas.draw method does) and it is intended for interactive use when you want to force a redraw >>> o = title('blah') >>> o.set_fontsize(12) # no draw >>> o.set_fontstyle('italic') # no draw >>> draw() # draw Perry and I discussed trying to come up with some python magic such that calls to setattr on an artist would trigger a call to the matlab interface draw_if_interactive. This would have to be done carefully, because some users will explicitly not want to force a redraw on any call to a setter since drawing is potentially an expensive operation. True, they could temporarily turn interaction off, but I think any solution here would need to be optional. JDH |