How to plot a complicated 3D graph
조회 수: 4 (최근 30일)
이전 댓글 표시
Hi there,
I'm only new to matlab but I'm trying to plot a graph like this
I would appreciate any feedback, suggestions, advice on how you could achieve this
I have an array of arrival times and departure times.
x=load('arrivaltimes.txt'); y=load('departuretimes.txt');
Would I start off by plotting a histogram of departure times and arrival times. Then a scatter plot of arrival and departure times. And then some how make them 3D?
Thank you
댓글 수: 0
답변 (1개)
Walter Roberson
2012년 1월 11일
hist() calls bar() to create the plots. bar() creates a hggroup object whose children are patch objects, each of which has XData and YData properties defining where the patch should be drawn. Each of those patches will also have an empty ZData property.
You can play tricks such as grabbing the YData, setting the ZData to that, and setting the YData to an array of constant value.
For the scatter plot, use scatter3()
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Polygons에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!