diff m-toolbox/classes/+utils/@plottools/restoreDefaultPlotSettings.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m-toolbox/classes/+utils/@plottools/restoreDefaultPlotSettings.m	Wed Nov 23 19:22:13 2011 +0100
@@ -0,0 +1,27 @@
+% RESTOREDEFAULTPLOTSETTINGS Restore the saved plot settings.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% DESCRIPTION: RESTOREDEFAULTPLOTSETTINGS Restore the saved plot settings.
+%              This method will recover the saved plot settings which are
+%              stored in the application data 'defaultPlotSettings'.
+%
+% CALL:        restoreDefaultPlotSettings()
+%
+% VERSION:     $Id: restoreDefaultPlotSettings.m,v 1.3 2011/02/10 16:06:51 ingo Exp $
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+function restoreDefaultPlotSettings()
+  
+  plotSettings = getappdata(0,'defaultPlotSettings');
+  
+  if ~isempty(plotSettings)
+    settings = fieldnames(plotSettings);
+    for ii = 1:numel(settings);
+      set(0, settings{ii}, plotSettings.(settings{ii}));
+    end
+  else
+    warning('LTPDA:restoreDefaultPlotSettings', '!!! No plot settings are stored');
+  end
+  
+end