summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2012-09-18 21:49:16 -0400
committerEugeniy Mikhailov <evgmik@gmail.com>2012-09-18 21:49:16 -0400
commit346d4ac59f89525087124c7a8f9cf284aa0a5ea4 (patch)
treeba9977570fc464f366ec2c4dff8100a70a513c45
parent31e0152f4c1da624c21e6b509fd12177dd178d59 (diff)
downloadbeam_profiler-346d4ac59f89525087124c7a8f9cf284aa0a5ea4.tar.gz
beam_profiler-346d4ac59f89525087124c7a8f9cf284aa0a5ea4.zip
fixed issue with skewed color map
apparently drawing a line mess things up if 'hold off' is not enabled for further redrawing.
-rw-r--r--gui_win.m5
1 files changed, 5 insertions, 0 deletions
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