Formatting Rectangle Matlab.

조회 수: 19 (최근 30일)
Kemba Huskie
Kemba Huskie 2017년 11월 19일
댓글: Stephen23 2017년 11월 19일
Hi everyone, I'm having trouble formatting my rectangle in Matlab. I created my rectangle using the rectangle function. Thus for example, the code for my Rectangle is:
rectangle('Position',[2,0,1,3]).
I however, want my rectangle to have a top line (top side) that is dashed and green. I want the other three sides to be pink (solid though not dashed). I tried to search, but I couldn't find anything to achieve this. I could really use some help. Thank you.
  댓글 수: 1
Stephen23
Stephen23 2017년 11월 19일
The rectangle function does not have an option to specify different edge colors. You could:
  • use rectangle for the pink sides and overlay one green line along the top.
  • use line to create all of the lines.
  • use patch to create the shape, which does allow different edge colors.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by