How to write a code to add notifier (text/value) for every point on plot?

조회 수: 6 (최근 30일)
Raju
Raju 2018년 1월 26일
답변: Raju 2018년 1월 29일
In my plot,every y value corresponding to x value represents something for (eg. temperature values). I want these temperature values (like 50 C, 100 C etc. for points on plot) to be added for every point? How do I do that?

답변 (2개)

Steven Lord
Steven Lord 2018년 1월 26일
You can use the text function to do this, but if you have a lot of points that may lead to overlapping labels and/or a plot that's hard to read. If you just want to be able to ask what temperature is associated with each point, consider using a data cursor with a function you write to customize the text that is displayed on the cursor.

Raju
Raju 2018년 1월 29일
thanks for your reply. Is there any way to place text for each point with code? I have many graphs to be performed with same operation. It is time consuming to do that manually.

카테고리

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