change text colour in foreground of line plot

12 vues (au cours des 30 derniers jours)
Nik Rocky
Nik Rocky le 6 Juil 2020
Commenté : Nik Rocky le 15 Juil 2020
Hello,
how can I change text color above line plot? It is possible? Its not about changin whole text color, its about just this part that the line is crossing my text behind
to make it more readable
  1 commentaire
Adam Danz
Adam Danz le 7 Juil 2020
How did you get the black hand symbol for the cursor icon?

Connectez-vous pour commenter.

Réponses (2)

madhan ravi
madhan ravi le 6 Juil 2020
text(.2,.7,'Echt toll! Nik Rocky','Color','g')
  5 commentaires
madhan ravi
madhan ravi le 6 Juil 2020
Check if you can experiment with the face alpha properties.
Nik Rocky
Nik Rocky le 6 Juil 2020
ok Thanks!

Connectez-vous pour commenter.


Adam Danz
Adam Danz le 7 Juil 2020
Modifié(e) : Adam Danz le 13 Juil 2020
The color of pixels in a text object cannot be independently changed.
Here are some things you can try to improve the label readability.
1) Add a partially transparent label background using the backgroundColor property and a 4-element RGB value where the 4th element specifies the transparency.
h = labelpoints(x, y, labels, 'backgroundColor', [1 1 1 .5])
or make the text color partially tranparent
h = labelpoints(x, y, labels, 'Color', [1 1 1 .5])
2) Space the labels further from the lines using a larger buffer value and use NE and SW .
h1 = labelpoints(x, y, labels, 'NE', .1) % for orange line
h2 = labelpoints(x, y, labels, 'SW', .1) % for blue line
  1 commentaire
Nik Rocky
Nik Rocky le 15 Juil 2020
Thank you, it works great!

Connectez-vous pour commenter.

Catégories

En savoir plus sur Graphics Object Properties dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by