function PlotThroatProfile(thprof,dim)
% Description: plots all network throats as patches (2D)
%
% Inputs:
% thprof = throat profile struct
% dim    = network dimensions
        
    % Parameters
    nths = length(thprof);
    
    % Loop through throats
    for ith=1:nths
        % Get points/radii along profile
        pos = thprof(ith).pos;
        ptw = thprof(ith).radius;
        % Plot throat
        vtmp = pos(1,:) - pos(end,:);
        vtmp = vtmp/norm(vtmp);
        vtmp = [-vtmp(2),vtmp(1)];
        ptA = pos(:,1:2) + [ptw.*vtmp(1), ptw.*vtmp(2)];
        ptB = pos(:,1:2) + [-ptw.*vtmp(1), -ptw.*vtmp(2)];
        hold on; patch([ptA(:,1);flipud(ptB(:,1))],dim(2)-[ptA(:,2);flipud(ptB(:,2))],[0.2,0.8,0.2],'FaceAlpha',0.5);  % NB: throats plotted in light green color
    end
    
end  %[function]

