123456789101112131415161718192021222324252627282930313233343536373839404142 |
- %% Fig. 2C - BarChart
- clear all
- close all
- % ==========================================================================
- %% k-mean cluster barchart - Expert - Expert
- % ==========================================================================
- %Prepare variables
- load('Fig2C_BarChart.mat');
- NofMouse = 6;
- catNames = {'Ohters', 'Stable', 'RampUp', 'RampDown', ...
- 'I-Up', 'R-Up', 'I-RampUp', 'I-RampDown', 'R-RampUp', 'R-RampDown'};
- % ===============================================================================
- %% Bar chart (mean)+ SEM - Proportion of cells from each mouse for each cluster
- % ===============================================================================
- fig1 = figure('Name', 'Proportion of cells for clusters -Go-Ex-Ex');
- fig1.Position = [680 558 1060 420];
- Mean = mean(CellRatio4Cluster,1);
- SEM = std(CellRatio4Cluster,1)/sqrt(NofMouse);
- bar(1:size(catNames,2), Mean, 'FaceColor', 'none', 'EdgeColor', 'k');
- hold on;
- er = errorbar(1:size(catNames,2), Mean, SEM);
- er.Color = [0 0 0];
- er.LineStyle = 'none';
- er.MarkerEdgeColor = 'none';
- xticks([1 2 3 4 5 6 7 8 9 10]);
- xticklabels(catNames);
- box off
- ylim([0 0.55]);
- yticks([0 0.1 0.2 0.3 0.4 0.5]);
- ylabel('Proportion of cells')
- %Add scatter plot--------------------------------------------------------------------------
- DotColor = [0.75 0.75 0.75];
- sz = 20;
- ScatterID = repmat(1:length(catNames), size(CellRatio4Cluster,1),1);
- scatter(ScatterID(:),CellRatio4Cluster(:), [], DotColor, 'filled','MarkerFaceAlpha',0.5','jitter','on','jitterAmount',0.15);
|