[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Autosaving plots after each modification

From: Ben Abbott
Subject: Re: Autosaving plots after each modification
Date: Fri, 20 Feb 2015 18:10:54 -0500

On Feb 20, 2015, at 1:59 AM, Alex K <address@hidden> wrote:

Try adding a "drawnow ()" to the handler before the print command.

Thank you but unfortunately it didn't change anything, still getting the same error...

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')


reply via email to

[Prev in Thread] Current Thread [Next in Thread]