Changing Name Location of Points

3 Ansichten (letzte 30 Tage)
Johann Seidl
Johann Seidl am 19 Feb. 2020
Kommentiert: Johann Seidl am 20 Feb. 2020
Hey Community,
i am trying to name points in graph. It is writing the correct description at almost the correct position. For better visiblity I want, that the description in the graph is very close to the point but not interacting with any line in the graph.
Currently I use the following statement to name the points
text(x_coord , y_coord , Number of the point, 'fontsize',15)
Is there any feasible solution for that problem?
Thanks in advance.
  2 Kommentare
Jacob Wood
Jacob Wood am 19 Feb. 2020
Johann Seidl
Johann Seidl am 20 Feb. 2020
Thanks but no. Because i do need that numbers label the points.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

darova
darova am 19 Feb. 2020
You can set backgroundcolor to your labels
x = linspace(0,10);
y = sin(x);
plot(x,y)
text(0.8,0.8,'he','backgroundcolor','r')
  1 Kommentar
Johann Seidl
Johann Seidl am 20 Feb. 2020
Thanks! It's not my ideal imagination but it works well!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by