I am ploting a line plot from an image. Ho can i plot 3 different plots in one plot.?

6 views (last 30 days)
figure('color','white');
imagesc(X003,[-5e-8 5e-8]);
axis off image;
colormap gray;
[cx1,cy1,c1,~,~]= improfile;
I have to plot Cx1,cy1,c1 in one line plot. i am able to plot in scatter and stem plot but not as line plot.
how can i plot this.?

Accepted Answer

Walter Roberson
Walter Roberson on 11 Dec 2015
Example:
point_idx = 1 : length(cx1);
plot(point_idx, cx1, 'b*-', point_idx, cx2, 'g.-', point_idx, c1, 'rs-')
However, be aware that cx1 is in the range 1 : number of columns, and cx2 is in the range 1 : number of rows, and cx2 is either in the range 0 to 255 or in the range 0 to 1. It is fairly likely that this item will not be to the same scale as cx1 or cx2.
  1 Comment
Nitish katoch
Nitish katoch on 11 Dec 2015
Edited: Nitish katoch on 11 Dec 2015
Thanks alot :) its working.!
point_idx = 1 : length(c1);
plot(point_idx, cx1, 'b*-', point_idx, cy1, 'g.-', point_idx, c1, 'rs-')
I have one elementary question here point_idx role is.?

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!