Changeset 622 for trunk/src/plot_object.m
 Timestamp:
 Apr 29, 2013, 11:35:27 AM (8 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/src/plot_object.m
r534 r622 115 115 end 116 116 case {'rectangle','ellipse','volume'} 117 if isequal(YMax,0)118 ylim=get(haxes,'YLim');119 YMax=(ylim(2)ylim(1))/100;120 end121 if isequal(XMax,0)122 XMax=YMax;%default123 end117 % if isequal(YMax,0) 118 % ylim=get(haxes,'YLim'); 119 % YMax=(ylim(2)ylim(1))/100; 120 % end 121 % if isequal(XMax,0) 122 % XMax=YMax;%default 123 % end 124 124 case 'plane' 125 125 if isequal(XMax,0) … … 274 274 end 275 275 %complement missing points 276 if size(ObjectData.Coord,1)>length(PlotData.SubObject) 277 for ipt=length(PlotData.SubObject)+1:size(ObjectData.Coord,1) 276 if length(PlotData.SubObject)>nbpoints% fpoints in excess on the graph 277 for ii=nbpoints+1: length(PlotData.SubObject); 278 if ishandle(PlotData.SubObject(ii)) 279 delete(PlotData.SubObject(ii)) 280 end 281 end 282 % NbDeformPoint=nbpoints; 283 end 284 if nbpoints>length(PlotData.SubObject) 285 for ipt=length(PlotData.SubObject)+1:nbpoints 278 286 PlotData.SubObject(ipt)=rectangle('Curvature',[1 1],... 279 287 'Position',[ObjectData.Coord(ipt,1)YMax ObjectData.Coord(ipt,2)YMax 2*YMax 2*YMax],'EdgeColor',col,... … … 284 292 end 285 293 if isfield(PlotData,'DeformPoint') 286 for ipt=1:length(PlotData.DeformPoint) 294 NbDeformPoint=length(PlotData.DeformPoint); 295 if NbDeformPoint>nbpoints% fpoints in excess on the graph 296 for ii=nbpoints+1:NbDeformPoint; 297 if ishandle(PlotData.DeformPoint(ii)) 298 delete(PlotData.DeformPoint(ii)) 299 end 300 end 301 NbDeformPoint=nbpoints; 302 end 303 for ipt=1:NbDeformPoint 287 304 if ishandle(PlotData.DeformPoint(ipt)) 288 305 if nbpoints>=ipt … … 299 316 end 300 317 end 301 elseif isequal(ObjectData.Type,'rectangle')isequal(ObjectData.Type,'ellipse')318 elseif (isequal(ObjectData.Type,'rectangle')isequal(ObjectData.Type,'ellipse'))&&XMax>0 && YMax>0 302 319 set(hplot,'Position',[ObjectData.Coord(1,1)XMax ObjectData.Coord(1,2)YMax 2*XMax 2*YMax]) 303 320 end
Note: See TracChangeset
for help on using the changeset viewer.