function rotate_peaks_cb(action, fig, h_current_obj)

switch action
case 'rotate'
    if get(h_current_obj, 'value')
        rotate3d(fig, 'on')
    else
        rotate3d(fig, 'off')
    end
case 'view'
    view(fig, 3);
otherwise
    disp('not a valid action...')
end