plotLasagnaRFs.m 1.0 KB

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