Code covered by the BSD License  

Highlights from
choose_profile_limits

image thumbnail
from choose_profile_limits by Kevin Bartlett
Allows user to choose limits of oceanographic profile (e.g., CTD cast)

marker_control_callback()
function [] = marker_control_callback()
%
% marker_control_callback.m--Callback for "Marker" button.
%
% Syntax: marker_control_callback

% Developed in Matlab 7.0.1.24704 (R14) Service Pack 1 on GLNX86.
% Kevin Bartlett (kpb@uvic.ca), 2006-03-20 15:09
%-------------------------------------------------------------------------

lineProps = get(findobj(gcbf,'Tag','full_ax_preStartDepthLine'),'UserData');
markerStyle = lineProps{1};
markerVal = lineProps{2};

% If marker value currently on, set it to off, and vice-versa.
if strcmp(markerVal,'on')
   lineProps{2} = 'off';
   set(findobj(gcbf,'Tag','full_ax_preStartDepthLine'),'UserData',lineProps);
   markerStr = 'none';
else
   lineProps{2} = 'on';
   set(findobj(gcbf,'Tag','full_ax_preStartDepthLine'),'UserData',lineProps);
   markerStr = markerStyle;
end % if

set(findobj(gcbf,'Tag','full_ax_preStartDepthLine'),'marker',markerStr);
set(findobj(gcbf,'Tag','full_ax_postEndDepthLine'),'marker',markerStr);
set(findobj(gcbf,'Tag','full_ax_selectDepthLine'),'marker',markerStr);
set(findobj(gcbf,'Tag','start_ax_preStartDepthLine'),'marker',markerStr);
set(findobj(gcbf,'Tag','start_ax_postEndDepthLine'),'marker',markerStr);
set(findobj(gcbf,'Tag','start_ax_selectDepthLine'),'marker',markerStr);
set(findobj(gcbf,'Tag','end_ax_preStartDepthLine'),'marker',markerStr);
set(findobj(gcbf,'Tag','end_ax_postEndDepthLine'),'marker',markerStr);
set(findobj(gcbf,'Tag','end_ax_selectDepthLine'),'marker',markerStr);

Contact us at files@mathworks.com