|
From: | Ben Abbott |
Subject: | Re: Autosaving plots after each modification |
Date: | Fri, 20 Feb 2015 18:10:54 -0500 |
The print() command will also modify the figure. Perhaps the problem is recursion, or maybe the problem is that the figure doesn’t yet have any content. Please try the version below. function my_handler(h, dummy) persistent isrunning = false if (strcmp(get(h, "__modified__"), "off") && ! isrunning && numel (get (h, “children”)) > 0) disp 'saving snapshot...'; print(gcf, 'snapshot.png', '-debug', '-dpng', '-S640,480') endif endfunction Ben |
[Prev in Thread] | Current Thread | [Next in Thread] |