필터 지우기
필터 지우기

Text inside curve like clabel

조회 수: 3 (최근 30일)
Albert Zurita
Albert Zurita 2022년 9월 29일
답변: Adam Danz 2022년 9월 29일
Hi, is there a way of writing a text inside a closed curve (e.g. an ellipse) similarly to what would be done with clabel? I compute myself the contour lines without the use of the built-in contour functions, but I still would like to place a label inside the curve. Thanks!
  댓글 수: 1
Mathieu NOE
Mathieu NOE 2022년 9월 29일
hello
why not simply use text at the x,y coordintaes you already know

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

답변 (1개)

Adam Danz
Adam Danz 2022년 9월 29일
> is there a way of writing a text inside a closed curve (e.g. an ellipse) similarly to what would be done with clabel?
In short, no. You'd have to build it yourself and it would be a heafty workload. You could, of course, use text to place a string at a specific location and orientation but all characters will share the same baseline (it can't curve).
To make text curve you'd need to set each character's position and orientation which can be computed from the curve. I demo this in a Community Highlight that shows text wrapped around a circle and the circular text is rotating so at each iteration of the animation, the character position and orientation is updated. But this is easier for a circle than for a curve with arbitrary curvature.

카테고리

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

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by