Problem with inserting a line in a surface plot through command
3 次查看(过去 30 天)
显示 更早的评论
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/166579/image.png)
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.
0 个评论
回答(1 个)
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)
另请参阅
类别
在 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!