One liner for your problem:
data = get(findobj(open('ttc_delay1000.fig'), 'Type','line'), {'XData','YData'});
Steps (from internal calls to external calls):
- open the file;
- look into it for a series of lines;
- return data.
data{n,1} will contain the XData LineSeries n , if data{n,2} will contain the YData specified LineSeries .
If you want to smooth the lines directly in the picture, the idea will be the same:
%//Prepare moving average filter of size N N = 5; f = @(x) filter(ones(1,N)/N, 1, x); %//Smooth out the Y data of the LineSeries hf = open('ttc_delay1000.fig'); for hl = transpose(findobj(hf,'Type','line')) set(hl, 'YData', f(get(hl,'YData'))); end; saveas(hf, 'ttc_delay1000_smooth.fig');
user2271770
source share