Hi everyone,
how to change linestyle when using plot3. I am trying to plot a dashed dot line (-----) between two points, it is not working. When I used:
plot3([x1,x2],[y1,y2],[z1,z2],'linewidth',3,'k--'),
only the linewidth and the color change but the linestyle is still solid. Please, would someone explain me how to set changes. Thanks a lot for advance. All the best !!!

댓글 수: 1

Stephen23
Stephen23 2017년 6월 29일
Look at the list of permitted syntaxes for plot3: the one you are using, with the linestyle following some name-value pairs is not listed. The one that Walter Roberson uses, where the linestyle precedes some name-value pairs is listed. You should always read the documentation.

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

답변 (1개)

Walter Roberson
Walter Roberson 2017년 6월 29일

0 개 추천

plot3([x1,x2],[y1,y2],[z1,z2],'k--','linewidth',3),

댓글 수: 5

Mma Kenya
Mma Kenya 2017년 6월 29일
Hi Roberson, I just tried it, it is the same, nothing is changing. I do not understand. Thank you !!!
Walter Roberson
Walter Roberson 2017년 6월 29일
편집: Walter Roberson 2017년 6월 29일
It works for me. Which release are you using?
plot3([1 2],[3 4],[5 6],'k--','LineWidth',3)
Mma Kenya
Mma Kenya 2017년 6월 29일
Actually, I am not using matlab, I am using octave (GNU octave version 4.0.2). Maybe that is the cause of my issue. Because I just tried it again, same thing. What would you recommend to me then?
Walter Roberson
Walter Roberson 2017년 6월 29일
Mma Kenya
Mma Kenya 2017년 6월 29일
Thank you very much for your help !!!

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

카테고리

도움말 센터File Exchange에서 Octave에 대해 자세히 알아보기

태그

질문:

2017년 6월 29일

댓글:

2017년 6월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by