Changeset 61 for trunk/src/mouse_up.m
- Timestamp:
- Mar 24, 2010, 12:51:51 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mouse_up.m
r60 r61 133 133 write_plot_param(PlotHandles,UvData.Object{IndexObj}.PlotParam); %update the display of plotting parameters for the current object 134 134 end 135 set(hhuvmat.create,'Value',0);% set to 'off' the button for object creation136 set(hhuvmat.create,'BackgroundColor',[0 1 0]);% paint the creation button in green135 % set(hhuvmat.create,'Value',0);% set to 'off' the button for object creation 136 % set(hhuvmat.create,'BackgroundColor',[0 1 0]);% paint the creation button in green 137 137 set(hhuvmat.edit,'BackgroundColor',[1 1 0]);% paint the edit text in yellow 138 138 set(hhuvmat.edit,'Value',1);% … … 166 166 delete(AxeData.CurrentVec) 167 167 end 168 %update the axes UvData.Plane2 if it exists, else create it 169 % if isfield (UvData,'Plane2') & ishandle(UvData.Plane2.Fig)%if the second plan plotting axis already exists 170 % hfig2=UvData.Plane2.Fig; 171 % if isequal(gcf,hfig2)%if we are already on the secondary figure 172 % test_replot=1; 173 % else 174 % figure(hfig2)%set hfig2 as the current figure 175 % clf; %erase axes 176 % end 177 % else 178 hfig2=figure;%create new figure 179 set(hfig2,'name','zoom') 180 set(hfig2,'Units','normalized') 181 set(hfig2,'Position',[0.2 0.33 0.6 0.6]); 182 % UvData.Plane2.Fig=hfig2; 183 map=colormap(currentaxes); 184 colormap(map);%transmit the current colormap to the zoom fig 185 get(handles.RootFile,'String') 186 % end 168 hfig2=figure;%create new figure 169 set(hfig2,'name','zoom') 170 set(hfig2,'Units','normalized') 171 set(hfig2,'Position',[0.2 0.33 0.6 0.6]); 172 map=colormap(currentaxes); 173 colormap(map);%transmit the current colormap to the zoom fig 174 get(handles.RootFile,'String') 187 175 set(hfig2,'Position',[0.2 0.33 0.6 0.6]); 188 176 if test_replot==0 … … 219 207 ChildAxeData.ParentRect=AxeData.CurrentRectZoom;%set the rectangle as a 'parent' associated to the new axes 220 208 set(AxeData.ZoomAxes,'UserData',ChildAxeData);%update the AxeData of the new axes 221 % UvData.TopFig=hfig2;%put the new fig to the top of the stack for uvmat222 % set(huvmat,'UserData',UvData)223 209 set(AxeData.ZoomAxes,'Xlim',[PosRect(1) PosRect(1)+PosRect(3)]) 224 210 set(AxeData.ZoomAxes,'Ylim',[PosRect(2) PosRect(2)+PosRect(4)]) … … 277 263 if isequal(MouseAction,'ruler') 278 264 UvData.MouseAction='none'; 279 UvData=rmfield(UvData,'RulerHandle') 265 UvData=rmfield(UvData,'RulerHandle'); 280 266 xy=get(currentaxes,'CurrentPoint'); 281 RulerCoord=[UvData.RulerCoord ;xy(1,1:2)] 267 RulerCoord=[UvData.RulerCoord ;xy(1,1:2)]; 282 268 set(huvmat,'UserData',UvData) 283 RulerCoord=diff(RulerCoord,1) 269 RulerCoord=diff(RulerCoord,1); 284 270 RulerCoord=RulerCoord(1)+i*RulerCoord(2); 285 distance=abs(RulerCoord) 286 azimuth=(180/pi)*angle(RulerCoord) 271 distance=abs(RulerCoord); 272 azimuth=(180/pi)*angle(RulerCoord); 287 273 msgbox_uvmat('RULER','',['length: ' num2str(distance,3) ', angle(degrees): ' num2str(azimuth,3)]) 274 hruler=findobj(currentaxes,'Tag','ruler'); 275 delete(hruler) 288 276 end 289 277
Note: See TracChangeset
for help on using the changeset viewer.