From 346d4ac59f89525087124c7a8f9cf284aa0a5ea4 Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Tue, 18 Sep 2012 21:49:16 -0400 Subject: fixed issue with skewed color map apparently drawing a line mess things up if 'hold off' is not enabled for further redrawing. --- gui_win.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gui_win.m b/gui_win.m index 6eae2bc..39c5350 100644 --- a/gui_win.m +++ b/gui_win.m @@ -131,6 +131,8 @@ axes(handles.image2display); imagesc(image_display); % we need specific aspect ratio for images for them not to be stretched set(handles.image2display,'PlotBoxAspectRatio',[Nx Ny 1],'DataAspectRatio',[1 1 1]); +%colorbar; +%colormap hot; drawnow; % display cross lines if needed @@ -145,6 +147,8 @@ global image_display; [Ny, Nx] = size(image_display); if any( isnan(cross_coordinates) ) % cross coordinates are undefined no need to draw cross + axes(handles.image2display); + hold off; else x0=cross_coordinates(1); y0=cross_coordinates(2); @@ -159,6 +163,7 @@ else hold on; plot(hline_x, hline_y, 'LineWidth', cross_line_width, 'Color', cross_color); plot(vline_x, vline_y, 'LineWidth', cross_line_width, 'Color', cross_color); + hold off; end -- cgit v1.2.3