From: Thomas Britton on 6 Jul 2010 07:12 Dear All, I have (x,y,c) data that comes from 3 channels. For each point, I calculate the best quality channel to use, then I can display the data from that channel at the point. Once the data has been plotted, I'd love to 'outline' the channel boundaries (as good quality data tends to cluster). Example data: tdata=rand(5,5,3); %data as recorded qdata=rand(5,5,3); %quality parameter [maxq,channelloc]=max(qdata,[],3); %find the best quality data locations data_to_plot=tdata(channelloc); %extract the best data according to qdata from tdata % plot the two figures figure; imagesc(data_to_plot); title('Output Data'); figure; imagesc(channelloc); title('Channel Used'); From this, I'd like to plot a line that outlines data from a similar channel in the output data (to indicate that it came from a different channel). Many thanks for your suggestions, Ben
From: Thomas Britton on 7 Jul 2010 07:58 <bump> "Thomas Britton" <benjamin.britton(a)materials.ox.ac.remove.uk> wrote in message <i0v324$8kp$1(a)fred.mathworks.com>... > Dear All, > > I have (x,y,c) data that comes from 3 channels. For each point, I calculate the best quality channel to use, then I can display the data from that channel at the point. Once the data has been plotted, I'd love to 'outline' the channel boundaries (as good quality data tends to cluster). > > Example data: > > tdata=rand(5,5,3); %data as recorded > qdata=rand(5,5,3); %quality parameter > > [maxq,channelloc]=max(qdata,[],3); %find the best quality data locations > data_to_plot=tdata(channelloc); %extract the best data according to qdata from tdata > > % plot the two figures > figure; > imagesc(data_to_plot); > title('Output Data'); > figure; > imagesc(channelloc); > title('Channel Used'); > > From this, I'd like to plot a line that outlines data from a similar channel in the output data (to indicate that it came from a different channel). > > Many thanks for your suggestions, > Ben
From: Walter Roberson on 8 Jul 2010 15:17 Thomas Britton wrote: > <bump> > > "Thomas Britton" <benjamin.britton(a)materials.ox.ac.remove.uk> wrote in > message <i0v324$8kp$1(a)fred.mathworks.com>... >> Dear All, >> >> I have (x,y,c) data that comes from 3 channels. For each point, I >> calculate the best quality channel to use, then I can display the data >> from that channel at the point. Once the data has been plotted, I'd >> love to 'outline' the channel boundaries (as good quality data tends >> to cluster). >> >> Example data: >> >> tdata=rand(5,5,3); %data as recorded >> qdata=rand(5,5,3); %quality parameter >> >> [maxq,channelloc]=max(qdata,[],3); %find the best quality data locations >> data_to_plot=tdata(channelloc); %extract the best data according to >> qdata from tdata >> >> % plot the two figures >> figure; >> imagesc(data_to_plot); >> title('Output Data'); >> figure; >> imagesc(channelloc); >> title('Channel Used'); >> >> From this, I'd like to plot a line that outlines data from a similar >> channel in the output data (to indicate that it came from a different >> channel). I'm not sure why you don't hold on and then contour() on channelloc ?
From: Thomas Britton on 9 Jul 2010 08:28 Because I didn't think of that :) Thanks for the tip! Any suggestions on how to tinker with the colour of the contour lines? Ideally I'd like the border to be black. However I can't just add a black bin to the colour look up table as my raw data falls off the end of the colour range used. Walter Roberson <roberson(a)hushmail.com> wrote in message <i158e4$gvi$2(a)canopus.cc.umanitoba.ca>... > Thomas Britton wrote: > > <bump> > > > > "Thomas Britton" <benjamin.britton(a)materials.ox.ac.remove.uk> wrote in > > message <i0v324$8kp$1(a)fred.mathworks.com>... > >> Dear All, > >> > >> I have (x,y,c) data that comes from 3 channels. For each point, I > >> calculate the best quality channel to use, then I can display the data > >> from that channel at the point. Once the data has been plotted, I'd > >> love to 'outline' the channel boundaries (as good quality data tends > >> to cluster). > >> > >> Example data: > >> > >> tdata=rand(5,5,3); %data as recorded > >> qdata=rand(5,5,3); %quality parameter > >> > >> [maxq,channelloc]=max(qdata,[],3); %find the best quality data locations > >> data_to_plot=tdata(channelloc); %extract the best data according to > >> qdata from tdata > >> > >> % plot the two figures > >> figure; > >> imagesc(data_to_plot); > >> title('Output Data'); > >> figure; > >> imagesc(channelloc); > >> title('Channel Used'); > >> > >> From this, I'd like to plot a line that outlines data from a similar > >> channel in the output data (to indicate that it came from a different > >> channel). > > I'm not sure why you don't > > hold on > > and then contour() on channelloc ?
From: Thomas Britton on 9 Jul 2010 08:59 Doh! Turns out you can put use 'LineWidth' etc for the contours. Thanks for your help Walter. "Thomas Britton" <benjamin.britton(a)materials.ox.ac.remove.uk> wrote in message <i174kl$5dg$1(a)fred.mathworks.com>... > Because I didn't think of that :) Thanks for the tip! > > Any suggestions on how to tinker with the colour of the contour lines? > > Ideally I'd like the border to be black. However I can't just add a black bin to the colour look up table as my raw data falls off the end of the colour range used. > > Walter Roberson <roberson(a)hushmail.com> wrote in message <i158e4$gvi$2(a)canopus.cc.umanitoba.ca>... > > Thomas Britton wrote: > > > <bump> > > > > > > "Thomas Britton" <benjamin.britton(a)materials.ox.ac.remove.uk> wrote in > > > message <i0v324$8kp$1(a)fred.mathworks.com>... > > >> Dear All, > > >> > > >> I have (x,y,c) data that comes from 3 channels. For each point, I > > >> calculate the best quality channel to use, then I can display the data > > >> from that channel at the point. Once the data has been plotted, I'd > > >> love to 'outline' the channel boundaries (as good quality data tends > > >> to cluster). > > >> > > >> Example data: > > >> > > >> tdata=rand(5,5,3); %data as recorded > > >> qdata=rand(5,5,3); %quality parameter > > >> > > >> [maxq,channelloc]=max(qdata,[],3); %find the best quality data locations > > >> data_to_plot=tdata(channelloc); %extract the best data according to > > >> qdata from tdata > > >> > > >> % plot the two figures > > >> figure; > > >> imagesc(data_to_plot); > > >> title('Output Data'); > > >> figure; > > >> imagesc(channelloc); > > >> title('Channel Used'); > > >> > > >> From this, I'd like to plot a line that outlines data from a similar > > >> channel in the output data (to indicate that it came from a different > > >> channel). > > > > I'm not sure why you don't > > > > hold on > > > > and then contour() on channelloc ?
|
Pages: 1 Prev: read video file through mat lab r2010 Next: mexCallMATLAB,functions |