function plotResultForThreeParameterScan(XParameter, YParameter, DeltaParameter, ZQuantity, varargin) p = inputParser; p.KeepUnmatched = true; addRequired(p, 'FirstParameterArray', @isvector) addRequired(p, 'SecondParameterArray', @isvector) addRequired(p, 'ThirdParameterArray', @isvector) addRequired(p, 'QuantityOfInterestArray', @ismatrix) addParameter(p, 'RescalingFactorForFirstParameter', 1, @isscalar) addParameter(p, 'XLabelString', 'X parameter', @ischar) addParameter(p, 'RescalingFactorForSecondParameter', 1, @isscalar) addParameter(p, 'YLabelString', 'Y parameter', @ischar) addParameter(p, 'RescalingFactorForThirdParameter', 1, @isscalar) addParameter(p, 'RescalingFactorForQuantityOfInterest', 1, @isscalar) addParameter(p, 'ZLabelString', 'Z parameter', @ischar) addParameter(p, 'PlotTitleString', '', @ischar) addParameter(p, 'FigureTitleString', 'Third-Parameter Scan', @ischar) p.parse(XParameter, YParameter, DeltaParameter, ZQuantity, varargin{:}) XParameter = p.Results.FirstParameterArray; RescalingFactorForXParameter = p.Results.RescalingFactorForFirstParameter; XLabelString = p.Results.XLabelString; YParameter = p.Results.SecondParameterArray; RescalingFactorForYParameter = p.Results.RescalingFactorForSecondParameter; YLabelString = p.Results.YLabelString; DeltaParameter = p.Results.ThirdParameterArray; RescalingFactorForDeltaParameter = p.Results.RescalingFactorForThirdParameter; ZQuantity = p.Results.QuantityOfInterestArray; RescalingFactorForZQuantity = p.Results.RescalingFactorForQuantityOfInterest; ZLabelString = p.Results.ZLabelString; PlotTitleString = p.Results.PlotTitleString; FigureTitleString = p.Results.FigureTitleString; f_h = Helper.getFigureByTag('Three-Parameter Scan'); set(groot,'CurrentFigure',f_h); a_h = get(f_h, 'CurrentAxes'); if ~isempty(get(a_h, 'Children')) clf(f_h); end f_h.Name = 'Three-Parameter Scan'; f_h.Units = 'pixels'; set(0,'units','pixels'); screensize = get(0,'ScreenSize'); f_h.Position = [[screensize(3)/60 screensize(4)/10] 1530 870]; RescaledXParameter = XParameter .* RescalingFactorForXParameter; RescaledYParameter = YParameter .* RescalingFactorForYParameter; RescaledDeltaParameter = DeltaParameter .* RescalingFactorForDeltaParameter; tiledlayout(ceil(length(DeltaParameter)/3), 3) for i = 1:length(DeltaParameter) nexttile RescaledZQuantity = ZQuantity{i} .* RescalingFactorForZQuantity; imagesc(RescaledXParameter, RescaledYParameter, RescaledZQuantity(:,:)'); set(gca,'YDir','normal'); hXLabel = xlabel(XLabelString); hYLabel = ylabel(YLabelString); hPlotLabel = title(sprintf(PlotTitleString, RescaledDeltaParameter(i))); set([hXLabel, hYLabel, hPlotLabel] , ... 'FontSize' , 14); end caxis([min(min(min(RescaledZQuantity))) max(max(max(RescaledZQuantity)))]); shading flat; c = colorbar; c.Label.String= ZLabelString; c.Label.FontSize = 14; c.Layout.Tile = 'east'; hTitle = sgtitle(FigureTitleString); set( hTitle , ... 'FontSize' , 18 ); Helper.bringFiguresWithTagInForeground(); end