function plotLasagnaRFs(xRFs, yRFs, polarityStr, figDir, nameSuffix) %% Plot traces and average above colormap of single cell responses % Last subplot is a dummy to avoid resizing when colorbar is used. hFig = createPrintFig(15 * [ 1 2/3]); colors = brewermap(6, 'Paired'); colors = repmat(lines(2), numel(xRFs) + 1, 1); % colors = brewermap(numel(xRFs), 'Set1'); % colors = colors([1, 2, 4, 3, 1, 2, 4, 3, 1], :); hSubAx = plotLasagnaTracesFromCell(gcf, [xRFs(:)', yRFs(:)', xRFs(1)], colors); colorbar; linkaxes(hSubAx(:, 1), 'y'); linkaxes(hSubAx(:, 2), 'y'); hFig.Color = 'none'; set(hSubAx, 'Color', 'none'); setFontForThesis(hSubAx, hFig); arrayfun(@prettifyAxes, hSubAx); arrayfun(@offsetAxes, hSubAx); for iAx = 2: size(hSubAx, 1) - 1 hSubAx(iAx, 1).YAxis.Visible = 'off'; hSubAx(iAx, 2).YAxis.Visible = 'off'; hSubAx(iAx, 1).XAxis.Visible = 'off'; hSubAx(iAx, 2).XAxis.Visible = 'off'; end figFileName = ['RFcurves-' polarityStr '-XY-lasagna-' nameSuffix]; print(hFig, [figDir figFileName '.pdf'], '-dpdf'); end