MATLAB Answers

hend
0

how to draw 3 2D plots concurrently with their 3D plot in the same image

Asked by hend
on 1 May 2014
Latest activity Edited by José-Luis
on 2 May 2014
I want to draw an analytical signal in 3D space with it's projection in imaginary-time axes, real-time axes and real-imaginary axes concurrently. when I use command plot3 and then hold on with one of the 3 axes it plot it in the front of image not in the corresponding axes
like this one

  0 Comments

Sign in to comment.

Tags

1 Answer

Answer by José-Luis
on 1 May 2014
Edited by José-Luis
on 2 May 2014
 Accepted Answer

You could use plot3() and consecutively set one of the coordinates as a constant.
data = repmat((1:10)',1,3);
plot3(data(:,1),data(:,2),data(:,3));
l = size(data,1);
hold on;
xl = get(gca,'xlim');
yl = get(gca,'ylim');
zl = get(gca,'zlim');
plot3(data(:,1),data(:,2),repmat(zl(1),l,1));
plot3(data(:,1),repmat(yl(2),l,1),data(:,3));
plot3(repmat(xl(2),l,1),data(:,2),data(:,3));
grid on;

  0 Comments

Sign in to comment.