how can i cut data from a plot?
117 views (last 30 days)
Ben11 on 31 Jul 2014
Edited: Ben11 on 31 Jul 2014
As Sara suggests, using ginput to let the user select a x-value from which to crop:
x = 1:10*pi;
uiwait(msgbox('Select an x-value from which to crop','modal'));
[x_user ~] = ginput(1); % Let the user select an x-value from which to crop.
x(x>x_user) = ;
title('New plot with cropped values');
results in the following: