Plot cut line on a surface
조회 수: 12 (최근 30일)
이전 댓글 표시
Can someone please help me plotting the data from these cut lines over a 1d line graph?
I have attached my code.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/513507/image.jpeg)
댓글 수: 0
답변 (1개)
Kiran Felix Robert
2021년 2월 11일
Hi Vishal,
You can use the plot3 function to add cut line to your plot. The following Is an example, replace the second figure with the following code to see the cutlines.
%% Use you code upto end of figure 1 then add the following instead of your code
figure(2);
colormap(jet)
ax = gca;
surf(ax,XX,YY,VTHETA)
shading interp
pbaspect([(max(max(r))-min(min(r))) L_const 1])
colorbar('location','EastOutside');
title('Circumferential Velocity (v_\theta) (m/sec)');
caxis([0 0.4]);
view(0,90)
% Adding the Cut Lines
hold(ax,'on')
plot3(ax,[0.004,0.006],[0.00187,0.00150],[1,1],'k','LineWidth',3);
plot3(ax,[0.008,0.011],[0.01387,0.01350],[1,1],'k','LineWidth',3);
hold(ax,'off')
% End of Cut lines
댓글 수: 2
참고 항목
카테고리
Help Center 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!