goPlotHorzDistr

PURPOSE ^

This script produces the figure 4. It shows the distribution of horizontal

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 This script produces the figure 4. It shows the distribution of horizontal
 propagation of input nodes in C. Elegans neural network, small-world network
 random network, Drosophila's CX network in level 0-3.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % This script produces the figure 4. It shows the distribution of horizontal
0002 % propagation of input nodes in C. Elegans neural network, small-world network
0003 % random network, Drosophila's CX network in level 0-3.
0004 
0005 %   ---------
0006 %   Yen-Nan Lin, NTHU, 2010-2014, Matlab 2012a
0007 
0008 close all;
0009 
0010 % parameter of plot
0011 FIG_SIZE = [0 0 1000 800];
0012 MAX_PLOT_LEVEL = 4;
0013 NUM_BINS = [5 10 10 10]; % number of bins in each level
0014 SMALL_VALUE = 10^(-10); % to avoid log(0)
0015 lineWidth = 3;
0016 markerSize = 8;
0017 markerScale = 1.6;
0018 
0019 % setting of figure
0020 figure('outerPosition', FIG_SIZE, 'color', 'w');
0021 panelObj = panel('defer');
0022 panelObj.pack(2, 2);
0023 panelObj.fontsize = 15;
0024 panelObj.fontname = 'Arial';
0025 panelObj.fontweight = 'bold';
0026 panelObj.margin = [20 15 5 5];
0027 panelObj.de.margin = [15 15 5 5];
0028 
0029 for iLevel = 1:MAX_PLOT_LEVEL
0030     [colIx, rowIx] = ind2sub([2, 2], iLevel);
0031     panelObj(rowIx, colIx).select();
0032 
0033     % collect horizontal propagation of each input nodes
0034     ceHorzProp = rowPathRatio(ceNetwork.LevelMatrix{iLevel});
0035     cxHorzProp = rowPathRatio(cxNetwork.LevelMatrix{iLevel});
0036     randHorzProp = [];
0037     smallHorzProp = [];
0038     for jNet = 1:numel(randNetwork)
0039         tmpHorzProp = rowPathRatio(randNetwork{jNet}.LevelMatrix{iLevel});
0040         randHorzProp = vertcat(randHorzProp, tmpHorzProp);
0041         tmpHorzProp = rowPathRatio(smallRingNet{jNet}.LevelMatrix{iLevel});
0042         smallHorzProp = vertcat(smallHorzProp, tmpHorzProp);
0043     end
0044 
0045     % compute probability density of each network
0046     [ceProbDens, ceXOut] = probDensity(ceHorzProp, NUM_BINS(iLevel));
0047     [cxProbDens, pcbXOut] = probDensity(cxHorzProp, NUM_BINS(iLevel));
0048     [randProbDens, randXOut] = probDensity(randHorzProp, NUM_BINS(iLevel));
0049     [smallProbDens, smallXOut] = probDensity(smallHorzProp, NUM_BINS(iLevel));
0050     % adding small value to prevent log(0)
0051     ceProbDens = ceProbDens + SMALL_VALUE;
0052     cxProbDens = cxProbDens + SMALL_VALUE;
0053     randProbDens = randProbDens + SMALL_VALUE;
0054     smallProbDens = smallProbDens + SMALL_VALUE;
0055 
0056     % plot probability density of each network
0057     hold on;
0058     semilogy(ceXOut, ceProbDens, 'Marker', netMarker('CE'), 'Color', ...
0059         netColor('CE'), 'MarkerFaceColor', netMarkerFace('CE'), ...
0060         'LineWidth', lineWidth, 'MarkerSize', markerSize);
0061     semilogy(pcbXOut, cxProbDens, 'Marker', netMarker('CX'), 'Color', ...
0062         netColor('CX'), 'MarkerFaceColor', netMarkerFace('CX'), ...
0063         'LineWidth', lineWidth, 'MarkerSize', markerSize * markerScale);
0064     semilogy(randXOut, randProbDens, 'Marker', netMarker('ER'), 'Color', ...
0065         netColor('ER'), 'MarkerFaceColor', netMarkerFace('ER'), ...
0066         'LineWidth', lineWidth, 'MarkerSize', markerSize * markerScale);
0067     semilogy(smallXOut, smallProbDens, 'Marker', netMarker('SW'), 'Color', ...
0068         netColor('SW'), 'MarkerFaceColor', netMarkerFace('SW'), ...
0069         'LineWidth', lineWidth, 'MarkerSize', markerSize);
0070 
0071     % setting plot
0072     set(gca, 'yscale', 'log', 'lineWidth', 2, 'yTick', [10^-2, 1, 10^2]);
0073     xlim([0, 1]);
0074     ylim([10^(-3), 10^2]);
0075     if iLevel == 1
0076         legend('CE', 'CX', 'ER', 'SW');
0077         legend('location', 'NorthEast');
0078         hL = legend('boxoff');
0079         set(hL, 'fontsize', 12);
0080     end
0081 end
0082 
0083 panelObj.xlabel('Horizontal propagation');
0084 panelObj.ylabel('Probability density');
0085 ylabelH = findobj('string', 'Probability density');
0086 panelObj.refresh();
0087 set(ylabelH, 'position', [0.1 1 0]);

Generated on Thu 30-Jan-2014 00:00:07 by m2html © 2005