Prev: question about bwperim
Next: Question about dicom read
From: Xiaonan on 20 Jul 2010 15:25 I am having the same issue when implementing the brush and link features in a for loop. Solutions would be greatly appreciated! -X "Mitch " <citkane(a)gmx.de> wrote in message <hroseg$5u0$1(a)fred.mathworks.com>... > Hi yall, > > I am editing measured data in a plot with linkdata and while I am doing this, I need my script to hold. First things I tried were pause and waitfor, but when I use those, they somehow block linkdata. > If I let the script run until the plotting commands only, everything works fine. Usually, when I brush data e.g. in the 1st subplot, I can see the brushed datapoints in the 3rd subplot as well. But when I use waitfor or pause, the brushed datapoints are not visible in the 3rd plot and the variable is also not edited, which means linkdata is not working. > > Here's a short version of my script: > > %load data in variables data1, data2 (2 columns) > fig1=subplot(2,2,1), loglog(data1(:,1), data1(:,2), 'XDataSource', 'data1(:,1)', 'YDataSource', 'data1(:,2)'); %data1 plot > subplot(2,2,2), loglog(data2(:,1), data2(:,2), 'XDataSource', 'data2(:,1)', 'YDataSource', 'data2(:,2)'); %data2 plot > subplot(2,2,3), loglog(data1(:,1), data1(:,2), 'XDataSource', 'data1(:,1)', 'YDataSource', 'data1(:,2)'data2(:,1), data2(:,2), 'XDataSource', 'data2(:,1)', 'YDataSource', 'data2(:,2)'); %plot of both data together > linkdata on > brush on > waitfor(fig1) or pause %Here I need alternatives > ...then the script goes on and I use the edited variables 'data1', 'data2' > > So if someone could help me with a good idea how to hold the script, Id be very thankful.
From: someone on 20 Jul 2010 15:41 "Mitch " <citkane(a)gmx.de> wrote in message <hroseg$5u0$1(a)fred.mathworks.com>... > Hi yall, > > I am editing measured data in a plot with linkdata and while I am doing this, I need my script to hold. First things I tried were pause and waitfor, but when I use those, they somehow block linkdata. > If I let the script run until the plotting commands only, everything works fine. Usually, when I brush data e.g. in the 1st subplot, I can see the brushed datapoints in the 3rd subplot as well. But when I use waitfor or pause, the brushed datapoints are not visible in the 3rd plot and the variable is also not edited, which means linkdata is not working. % Just a wild guess - perhaps if you inserted a drawnow % command between % the plot & linkdata lines % or brush on & pause/waitfor lines? > > Here's a short version of my script: > > %load data in variables data1, data2 (2 columns) > fig1=subplot(2,2,1), loglog(data1(:,1), data1(:,2), 'XDataSource', 'data1(:,1)', 'YDataSource', 'data1(:,2)'); %data1 plot > subplot(2,2,2), loglog(data2(:,1), data2(:,2), 'XDataSource', 'data2(:,1)', 'YDataSource', 'data2(:,2)'); %data2 plot > subplot(2,2,3), loglog(data1(:,1), data1(:,2), 'XDataSource', 'data1(:,1)', 'YDataSource', 'data1(:,2)'data2(:,1), data2(:,2), 'XDataSource', 'data2(:,1)', 'YDataSource', 'data2(:,2)'); %plot of both data together > linkdata on > brush on > waitfor(fig1) or pause %Here I need alternatives > ...then the script goes on and I use the edited variables 'data1', 'data2' > > So if someone could help me with a good idea how to hold the script, Id be very thankful.
|
Pages: 1 Prev: question about bwperim Next: Question about dicom read |