Hi,
In the new unit testing framework, I am using the following code to try to temporarily suppress the plots generated by the functions being tested:
methods ( TestMethodSetup ) function killPlots ( testCase ) set(0,'DefaultFigureVisible','off'); end endmethods ( TestMethodTeardown ) function loadPlots ( testCase ) set(0,'DefaultFigureVisible','on'); end end
However, when I execute set(0,'DefaultFigureVisible','off'); inside the unit test, I cannot turn figures back on, even when I run the 'on' code inside the main session window.
Suppressing plots in unit tests works, but how do I turn them back on after execution?
Thanks,
Gordon
Best Answer