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

조회 수: 20 (최근 30일)
MathWorks Support Team
MathWorks Support Team 2019년 5월 21일
답변: MathWorks Support Team 2019년 6월 12일
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.

채택된 답변

MathWorks Support Team
MathWorks Support Team 2019년 6월 13일
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:

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Contour Plots에 대해 자세히 알아보기

제품


릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by