Code covered by the BSD License  

Highlights from
Data Browser

image thumbnail
from Data Browser by Phil Larimer
A utility to browse data files that involve one or more channels of data over time.

printWithAxes(figure)
function printWithAxes(figure)

% function for printing a newScope

    if nargin == 0
        figure = gcf;
    end

    handles = get(figure, 'userData');

    % hide the cursors
    for i = 1:handles.axesCount
       kidKids = get(handles.axes(i), 'children');
       set(kidKids(end - 1:end), 'visible', 'off');
    end

    set(handles.axes, 'xtickmode', 'auto', 'ytickmode', 'auto');
    set(handles.timeControl.frame, 'visible', 'off');
    set([handles.channelControl.frame], 'visible', 'off');
    
    % zbuffer is printing a bitmap, whereas painters use vector graphics
    if handles.axesCount > 1
        set(figure, 'PaperOrientation', 'portrait');
        set(figure, 'PaperPosition', [.25 .25 9.5 10.25])        
    else
        set(figure, 'PaperOrientation', 'landscape');
        set(figure, 'PaperPosition', [.25 .25 12.25 7.75])        
    end
    
    if isdeployed
        deployprint('-noui');
    else
        print('-v', '-noui', figure)
    end

    for i = 1:handles.axesCount
       kidKids = get(handles.axes(i), 'children');
       set(kidKids(end - 1:end), 'visible', 'on');
    end

    set(handles.axes(1), 'xtickmode', 'auto', 'ytickmode', 'auto');
    set(handles.axes(2:end), 'xtick', [], 'ytickmode', 'auto');
    set(handles.timeControl.frame, 'visible', 'on');
    set([handles.channelControl.frame], 'visible', 'on');  

Contact us at files@mathworks.com