plot measurement data [USAGE] [obj] = vb_timeseries_viewer_plot_measurement_data(obj, window_from, window_to); [IN] obj : vb_timeseries_viewer object. window_from : display from [sec] window_to : display to [sec] [OUT] obj : vb_timeseries_viewer object. Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function [obj] = vb_timeseries_viewer_plot_measurement_data(obj, window_from, window_to) 0002 % plot measurement data 0003 % [USAGE] 0004 % [obj] = vb_timeseries_viewer_plot_measurement_data(obj, window_from, window_to); 0005 % [IN] 0006 % obj : vb_timeseries_viewer object. 0007 % window_from : display from [sec] 0008 % window_to : display to [sec] 0009 % [OUT] 0010 % obj : vb_timeseries_viewer object. 0011 % 0012 % Copyright (C) 2011, ATR All Rights Reserved. 0013 % License : New BSD License(see VBMEG_LICENSE.txt) 0014 0015 % 0016 % --- Previous check 0017 % 0018 if ~exist('obj', 'var') 0019 error('obj is a required parameter.'); 0020 end 0021 0022 % 0023 % --- Main Procedure 0024 % 0025 0026 H = obj.H; 0027 0028 cla(H.data_axes); 0029 if ~isempty(obj.preview_file) 0030 Nsample = vb_continuous_file_get_Nsample(obj.preview_file); 0031 freq = vb_continuous_file_get_sample_freq(obj.preview_file); 0032 0033 [obj.preview_file, data, from, to] = vb_continuous_file_get_sample(obj.preview_file, ... 0034 obj.data_ch_list, ... 0035 ceil(freq*window_from), ceil(freq*window_to)); 0036 axis(H.data_axes, 'manual'); 0037 step = 1; 0038 t = [from-1:to-1]/freq; 0039 ix = [1:step:size(data,2)]; 0040 0041 % Data processing by proc_spec_list is not implemented yet. 0042 plot(H.data_axes, t(1:step:length(t)), data(:, ix), 'k'); 0043 0044 max_value = max(data(:)); 0045 min_value = min(data(:)); 0046 % ylim(H.data_axes, [min_value, max_value]); 0047 0048 % Ylimit(upper, lower) 0049 % set(H.ylimit_high_edit, 'String', num2str(max_value)); 0050 % set(H.ylimit_low_edit, 'String', num2str(min_value)); 0051 0052 set(H.unavailable_text, 'Visible', 'off'); 0053 set(H.make_preview_file_push, 'Visible', 'off'); 0054 else 0055 % set(H.unavailable_text, 'Visible', 'on'); 0056 % set(H.make_preview_file_push, 'Visible', 'on'); 0057 end 0058 0059 % Set Label(should be done after plotting) 0060 % h = xlabel(H.data_axes, 'Time[sec]', ... 0061 % 'FontName', 'Times', 'FontUnit', 'points', ... 0062 % 'FontSize', 14); 0063 % set(h, 'FontUnit', 'normalized'); 0064 % 0065 % h = ylabel(H.data_axes, 'Measurement data', 'FontUnit', 'points', ... 0066 % 'FontName', 'Times', 'FontSize', 14); 0067 % set(h, 'FontUnit', 'normalized'); 0068 % 0069 % % Set Axes font 0070 % set(H.data_axes, 'FontUnit', 'points', 'FontName', 'Times', ... 0071 % 'FontSize', 14); 0072 % set(H.data_axes, 'FontUnit', 'normalized'); 0073 0074 % Set Grid on 0075 set(H.data_axes, 'XGrid', 'on'); 0076 set(H.data_axes, 'YGrid', 'on'); 0077 0078 % position 0079 xlim(H.data_axes, [window_from, window_to]); 0080