3 views (last 30 days)

I want to plot multiple 3d graphs in a single graph.

I have my data in the form x1, x2, y and z= fun(x1,x2,y). In similar manner i have four set of values which are to be plotted in the same graph.

I tried using isosurface command but it didnt work well.

So please help me in plotting the graph

Thanks in advance

Bjorn Gustavsson
on 10 Jul 2019

It is still a bit unclear exactly what type of data you have, but multiple 4-D data in one graph is a lot of information to digest for any viewer, it might be the right thing to do and regardless you might still want to do it.

If you have reasonable sparse data, or only a few points (per dimension) you might get a good overview-plot using scatter3:

scatter3(x1,x2,y,z1,z2,'filled')

But that will only let you present 2 of the data-sets. If you have data that you can somewhat interpret as a vector-field there are some file exchange contributions for enhanced quiver-plots (if you can use 3 data-sets for the vector-components and the fourth for colour): quiver3_c, Quiver. There are other tools for tensor-field visualization: Tensor-field-visualization that might be of use.

If you have 4 sets of volumetric data on a "dense" regular grid, then my suggestion is that you should reconsider your design - even scalar volumetric visualization is dodgy - nice-looking for overview data visualization but quantitatively dodgy for our 2-eye-visual perception. You might find some extensions of slice: slice-variant at FEX. Though I'd be inclined to extend tcolor to plot i 3-D and then wrap that function into a slice_rgb - but that would only let you 3 plot 3 of your data-sets.

Bjorn Gustavsson
on 10 Jul 2019

Sign in to comment.

Sign in to answer this question.

Opportunities for recent engineering grads.

Apply Today
## 2 Comments

## Direct link to this comment

https://se.mathworks.com/matlabcentral/answers/471012-how-to-plot-a-multiple-4d-array-on-same-graph#comment_723011

⋮## Direct link to this comment

https://se.mathworks.com/matlabcentral/answers/471012-how-to-plot-a-multiple-4d-array-on-same-graph#comment_723011

## Direct link to this comment

https://se.mathworks.com/matlabcentral/answers/471012-how-to-plot-a-multiple-4d-array-on-same-graph#comment_723081

⋮## Direct link to this comment

https://se.mathworks.com/matlabcentral/answers/471012-how-to-plot-a-multiple-4d-array-on-same-graph#comment_723081

Sign in to comment.