Is there a way to make a 4D contour plot?

20 visualizaciones (últimos 30 días)
MathWorks Support Team
MathWorks Support Team el 21 de Mayo de 2019
Respondida: MathWorks Support Team el 12 de Jun. de 2019
I am looking to visualize some 4 dimensional data. What would the best way to do this be?
I want to create a sort of contour plot but instead of lines, it would show a group of surfaces that represent different cross-sections of the 4D curve.

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 13 de Jun. de 2019
You can create a 4D contour plot by using "isosurface" to plot a surface at 1 or more isovalues and setting the 'alpha' of each so that they are slightly transparent.
e.g.
[x,y,z,v] = flow;
levellist = linspace(-10,2,7);
for i = 1:length(levellist)
level = levellist(i);
p = patch(isosurface(x,y,z,v,level));
p.FaceVertexCData = level;
p.FaceColor = 'flat';
p.EdgeColor = 'none';
p.FaceAlpha = 0.3;
end
view(3)
Otherwise, MATLAB has a variety of other methods for visualizing 4D data. Take a look at this documentation link:

Más respuestas (0)

Categorías

Más información sobre Contour Plots en Help Center y File Exchange.

Productos


Versión

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by