Problem with inserting a line in a surface plot through command

조회 수: 3 (최근 30일)
Viscous Flow
Viscous Flow 2017년 8월 7일
댓글: Viscous Flow 2017년 8월 8일
I have a 2D channel flow over a flat plate at the centre of the channel. I want to represent the flat plate by inserting a horizontal line in the surface plots of my results.
When I insert the horizontal line in the surface plot with the command:
a = [0 7.4];
b = [0 0];
line(a,b,'Color','black','LineStyle','-.', 'LineWidth', 5)
some part of the line is not visible, as shown in the figure attached.
But when I insert the line manually from the figure window, then there is no such problem, which I am not able to understand.
I might be missing something obvious.
I would be very thankful if you could provide me some valuable insights.
Thanks in advance.

답변 (1개)

Mishaal Aleem
Mishaal Aleem 2017년 8월 7일
편집: Mishaal Aleem 2017년 8월 7일
In your provided code, you set the set the 'LineStyle' to '-.', which is a Dash-dot line line that has gaps. Try changing the 'LineStyle' to '-', which is a Solid line.
a = [0 7.4]; b = [0 0]; line(a,b,'Color','black','LineStyle','-', 'LineWidth', 5)
For more information, please see the Line Style Specifiers documenation.
  댓글 수: 1
Viscous Flow
Viscous Flow 2017년 8월 8일
The solid line also gave the same problem.
Since I was trying to draw a line in a 3D surface plot, I should use plot3d to overlay a line in the plot.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by