% parses arguments for plotting surfaces Usage: args = plot_surfaceArgs(varargin) varargin - key-value pairs according to matlabs plot parameters args - key-value pairs saved as struct Susanne Wenzel 09/16 wenzel@igg.uni-bonn.de
0001 %% parses arguments for plotting surfaces 0002 % 0003 % Usage: 0004 % args = plot_surfaceArgs(varargin) 0005 % 0006 % varargin - key-value pairs according to matlabs plot parameters 0007 % args - key-value pairs saved as struct 0008 % 0009 % Susanne Wenzel 09/16 0010 % wenzel@igg.uni-bonn.de 0011 function args = plot_surfaceArgs(varargin) 0012 0013 % set default parameters 0014 args.axes = gca; 0015 args.FaceLighting = 'flat'; % standard Matlab prop 0016 args.EdgeColor = 'k'; % standard Matlab prop 0017 args.alpha = 1; 0018 args.view = [-20,30]; 0019 args.shading = 'none'; % standard Matlab prop 0020 args.ColorFct = 'none'; % option: 'smoothtanh' 0021 args.Grid = 'off'; 0022 args.colormap = gray; 0023 args.plotfun = @surf; 0024 0025 args = parseArguments(args, varargin{:}); 0026 0027 0028