function drawSolution_L0seg(P,E,t,varargin)

hold on
m = size(E,2);
for i=1:m
    ei = E(:,i);
    xi1 = P(:,ei(1));
    xi2 = P(:,ei(2));
    ti = t(i);
    if nargin>3
        plot3([xi1(1),xi2(1)],[xi1(2),xi2(2)],[ti,ti],varargin{1})
    else
        plot3([xi1(1),xi2(1)],[xi1(2),xi2(2)],[ti,ti])
    end
end
hold off
