Home > src > plotSubs.m

plotSubs

PURPOSE ^

% Plot SubCoords

SYNOPSIS ^

function plotSubs( M, subM)

DESCRIPTION ^

% Plot SubCoords
 @author Mazurek/Bartalsky

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %% Plot SubCoords
0002 % @author Mazurek/Bartalsky
0003 
0004 %% plotSubs.m parameters
0005 % * *Description:*
0006 % * Plots lines from subcoordinates, this function computes
0007 % * all dimensions and returns a plot which is used by the axes in the GUI.
0008 % * *Input:*
0009 % * _M_ ... parallel coordinates of a dataset, rows are
0010 % dimensions, collumns are observations
0011 % * _subM_ ... matrix shaped like M, contains subcoordinates of the M matrix
0012 function plotSubs( M, subM)
0013 
0014 hold on
0015 axis off
0016 plot([0 0],[0 1], 'black');
0017 for b=1:size(M,2)-1
0018     sub=subM(b).subs;
0019     m = size(sub,2);
0020     n = size(sub,1);
0021 
0022     t=(b-1:1/(m+1):b);
0023     plot([b b],[0 1], 'black');
0024     x=[M(:,b) sub(:,:) M(:,b+1)];
0025     for i=1:n
0026         for j=1:m
0027             if(j~=m)
0028                 plot([t(j) (t(j+1))],[x(i,j) x(i,j+1)], 'r');
0029             else
0030                 plot([t(j) (t(j+1))],[x(i,j) x(i,j+1)], 'r');
0031                 plot([t(j+1) (t(j+2))],[x(i,j+1) x(i,j+2)], 'r');
0032             end
0033        end
0034     end
0035 end
0036 
0037 output_args = 0;
0038 end
0039

Generated on Tue 31-May-2016 19:24:56 by m2html © 2005