Combining multiple plot statements.
이전 댓글 표시
I want to combine multiple plot statements into one, for example, how could I write the following code using one plot statement?
plot(1,-1,'k*')
plot(1,(1/3),'k*')
plot(1,1,'k*')
plot(1,-5,'rv', 'MarkerFaceColor', 'r')
plot((1+sqrt(5)),0,'g^', 'MarkerFaceColor', 'g')
plot((1-sqrt(5)),0,'g^', 'MarkerFaceColor', 'g')
Thank you.
댓글 수: 4
Rik
2019년 10월 6일
Why do you want to merge them? That would make your code very difficult to understand.
Mughees Asif
2019년 10월 6일
Stephen23
2019년 10월 6일
"I just wanted to reduce reusing the same statements to make it a bit cleaner?"
Merging them will be much more confusing. Your current code is clear, legible, and easy to debug, I don't see any reason to change it.
Mughees Asif
2019년 10월 6일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
