function [X Y Z] = PlotData(p,i,n)

if (p.Fixed == 1)
    n = 1;
end

if(i <= p.n_elements)
   idx = find(~isnan(p.conn(i,:)));
   X = p.pts{1}(p.conn(i,idx));
   Y = p.pts{2}(p.conn(i,idx));
   Z = p.pts{3}(p.conn(i,idx));
else
    disp('ERROR in PlotData:  Incorrect element number)');
end
