Plotting 3D curves onto 3 different 2D subplots

1 view (last 30 days)
Hagai
Hagai on 6 Dec 2015
Commented: dpb on 6 Dec 2015
Hi,
I have lots of 3D curves which are colored encoded (means that for every point of each curve there is a different color). I have [X,Y,Z] which is Nx3 matrix defines the curve, and [cdata] Nx3 RGB matrix for each curve. I want to plot all the curves together in the same figure, so I used the following code:
for #ofcurves
p = patch([X' NaN],[Y' NaN],[Z' NaN],0);
cdata = reshape([cdata; NaN NaN NaN],length(cdata),1,3);
set(p,'CData', cdata, 'EdgeColor','interp','SpecularColorReflectance',1);
hold on;
end
With this method I get a 3D 'shape' that is very hard to render, but is working.
In order to get a better view of those curves, I want to divide this 3D image into 3 2D images for each plane (X-Y,X-Z,Y-Z), but when I try the above method it takes forever to produce... it would be faster to make the 3D image and then make each subplot to view it from a different angle - how can I do that? Or if you have a better way to do it please share.
  1 Comment
dpb
dpb on 6 Dec 2015
Probably attaching a dataset for testing and an image of what you've achieved and description of what you'd like would help...it's hard to envision just from code.

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!