goPlotVertIO

PURPOSE ^

This script produces the figure 7a. It plot the vertical propagation versus

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 This script produces the figure 7a. It plot the vertical propagation versus
 propagation levels in C. Elegans network, rand IO CE networks, separated IO
 CE networks, reversed IO CE network, small-world network, distant IO SW
 network. The curves are based on fitting Gompertz function. The errorbar is
 standard deviation.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % This script produces the figure 7a. It plot the vertical propagation versus
0002 % propagation levels in C. Elegans network, rand IO CE networks, separated IO
0003 % CE networks, reversed IO CE network, small-world network, distant IO SW
0004 % network. The curves are based on fitting Gompertz function. The errorbar is
0005 % standard deviation.
0006 
0007 %   ---------
0008 %   Yen-Nan Lin, NTHU, 2010-2014, Matlab 2012a
0009 
0010 close all;
0011 
0012 % plot setting
0013 FIG_SIZE = [0 0 1200 600];
0014 lineWidth = 3;
0015 markerSize = 10;
0016 markerScaleL = 1.5;
0017 markerScaleS = 1.2;
0018 
0019 % fitting with Gompertz function
0020 cfit.CE = fitGompertz(0:(MAX_LEVEL - 2), ceNetwork.VertProp);
0021 cfit.RingDist = fitGompertz(0:(MAX_LEVEL - 2), meanRingDistNet.VertProp);
0022 cfit.Ring = fitGompertz(0:(MAX_LEVEL - 2), meanRingNet.VertProp);
0023 cfit.RandIoCE = fitGompertz(0:(MAX_LEVEL - 2), meanRandIoCeNet.VertProp);
0024 cfit.SepIoCE = fitGompertz(0:(MAX_LEVEL - 2), meanSepIoCeNet.VertProp);
0025 cfit.RevIoCe = fitGompertz(0:(MAX_LEVEL - 2), revIoCeNet.VertProp);
0026 
0027 % save cfit object to each network
0028 ceNetwork.cfitVertProp = cfit.CE;
0029 meanRingDistNet.cfitVertProp = cfit.RingDist;
0030 meanRingNet.cfitVertProp = cfit.Ring;
0031 meanRandIoCeNet.cfitVertProp = cfit.RandIoCE;
0032 meanSepIoCeNet.cfitVertProp = cfit.SepIoCE;
0033 revIoCeNet.cfitVertProp = cfit.RevIoCe;
0034 
0035 % plot marker and errorbar of each networks
0036 figure('name', 'Vertical Propagation', 'outerPosition', FIG_SIZE, 'color', 'w');
0037 hold on;
0038 tmpP = linspace(0, MAX_LEVEL - 2, 100);
0039 plot(0:(MAX_LEVEL - 2), ceNetwork.VertProp, 'Marker', netMarker('CE'), ...
0040     'Color', netColor('CE'), 'MarkerSize', markerSize, ...
0041     'MarkerFaceColor', netMarkerFace('CE'), ...
0042     'LineWidth', lineWidth, 'LineStyle', 'none');
0043 errorbar(0:(MAX_LEVEL - 2), meanRandIoCeNet.VertProp, ...
0044     stdRandIoCeNet.VertProp, 'Marker', netMarker('RandIoCE'), ...
0045     'Color', netColor('RandIoCE'), 'MarkerSize', markerSize * markerScaleS, ...
0046     'MarkerFaceColor', netMarkerFace('RandIoCE'), ...
0047     'LineWidth', lineWidth, 'LineStyle', 'none');
0048 errorbar(0:(MAX_LEVEL - 2), meanSepIoCeNet.VertProp, ...
0049     stdSepIoCeNet.VertProp, 'Marker', netMarker('SepIoCE'), ...
0050     'Color', netColor('SepIoCE'), 'MarkerSize', markerSize * markerScaleL, ...
0051     'MarkerFaceColor', netMarkerFace('SepIoCE'), ...
0052     'LineWidth', lineWidth, 'LineStyle', 'none');
0053 plot(0:(MAX_LEVEL - 2), revIoCeNet.VertProp, ...
0054     'Marker', netMarker('RevIoCE'), 'Color', netColor('RevIoCE'), ...
0055     'MarkerSize', markerSize * markerScaleS, ...
0056     'MarkerFaceColor', netMarkerFace('RevIoCE'), ...
0057     'LineWidth', lineWidth, 'LineStyle', 'none');
0058 errorbar(0:(MAX_LEVEL - 2), meanRingNet.VertProp, ...
0059     stdRingNet.VertProp, 'Marker', netMarker('SW'), ...
0060     'Color', netColor('SW'), 'MarkerSize', markerSize, ...
0061     'MarkerFaceColor', netMarkerFace('SW'), ...
0062     'LineWidth', lineWidth, 'LineStyle', 'none');
0063 errorbar(0:(MAX_LEVEL - 2), meanRingDistNet.VertProp, ...
0064     stdRingDistNet.VertProp, 'Marker', netMarker('DistSW'), ...
0065     'Color', netColor('DistSW'), 'MarkerSize', markerSize, ...
0066     'MarkerFaceColor', netMarkerFace('DistSW'), 'LineWidth', lineWidth, ...
0067     'LineStyle', 'none');
0068 
0069 % plot fitting curve of each network
0070 plot(tmpP, cfit.CE(tmpP), 'Color', netColor('CE'), 'LineWidth', 4);
0071 plot(tmpP, cfit.RandIoCE(tmpP), 'Color', netColor('RandIoCE'), 'LineWidth', 4);
0072 plot(tmpP, cfit.SepIoCE(tmpP), 'Color', netColor('SepIoCE'), 'LineWidth', 4);
0073 plot(tmpP, cfit.RevIoCe(tmpP), 'Color', netColor('RevIoCE'), 'LineWidth', 4);
0074 plot(tmpP, cfit.Ring(tmpP), 'Color', netColor('SW'), 'LineWidth', 4);
0075 plot(tmpP, cfit.RingDist(tmpP), 'Color', netColor('DistSW'), 'LineWidth', 4);
0076 plot([2 2], [0 meanRandIoCeNet.cfitVertProp(2)], '--k', 'lineWidth', 3);
0077 set(gca, 'FontSize', 18, 'lineWidth', 4, 'FontWeight', 'bold');
0078 
0079 hL = legend('CE', 'Random I/O CE', 'Separated I/O CE', 'Reversed I/O CE', ...
0080     'SW', 'Distant I/O SW', 'location', 'southEast');
0081 legend(gca, 'boxoff');
0082 % to show the correct linewidth of errorbar's symbol due to matlab's bug
0083 set(findobj(hL, 'type', 'line'), 'LineWidth', lineWidth);
0084 
0085 xlim([0 4]);
0086 ylim([0 1.1]);
0087 xlabel('Propagation level');
0088 ylabel('Vertical propagation');
0089 set(gca, 'xTick', [0 1 2 3 4], 'yTick', [0 0.4 0.8 1]);
0090 box off;

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