Back to the main page.

Bug 2619 - ft_sourceplot is forced to be interactive

Status CLOSED FIXED
Reported 2014-06-20 12:27:00 +0200
Modified 2015-01-12 09:21:59 +0100
Product: FieldTrip
Component: plotting
Version: unspecified
Hardware: All
Operating System: Linux
Importance: P5 normal
Assigned to: Jan-Mathijs Schoffelen
URL:
Tags:
Depends on:
Blocks:
See also:

- 2014-06-20 12:27:39 +0200

Recently I cannot make multiple graphs anymore when I use mode 'ortho' without the code stopping during the creation of each graph, namely at line 803 uiwait(h); where it waits for user input to change the coordinates. This happens because at line 759 opt.quit is hardcoded to false. It would be great if this could be returned to depend on cfg.interactive - as it seems to have done before - so that I can choose to run the full code without user input. A default for cfg.interactive should then also be added to the code. Thank you, Best regards, Anne Fransen


Jan-Mathijs Schoffelen - 2014-06-20 12:41:27 +0200

The interactive option was removed with a purpose, because it was used inconsistently. As a matter of fact, the figure was always interactive, but only when cfg.interactive was explicitly set to 'no' (thus with the figure still being interactive!) the control was given back to the command line, rather than staying in the figure. Removing the uiwait(h) command does the trick equally well, and does not require the confusingly used option cfg.interactive. The reason why the while loop with opt.quit was present, is because in the old version users had the possibility to assign marked locations in the anatomical image, and in order to pass these locations to an output argument of the function, the graphical object needed to be accessed before quitting the function. This functionality has been removed explicitly (i.e. no output arguments will be generated anymore), which makes the flow of the code much more straightforward. I changed it, and it should work again as expected, but note that the cfg.interactive does not need to be specified.