change title color without modifying the original?

7 visualizzazioni (ultimi 30 giorni)
I want to change the color of the title of axes but without modifying it is to say that if graphic cos (x) that cos (x) appears but in yellow

Risposta accettata

Walter Roberson
Walter Roberson il 12 Nov 2017
If you can locate a handle to the title "text" graphics object, then you can set the Color property of it. However, this would set the color of all of the text, not just part of it. The title "text" object has a hidden handle:
ax = gca;
potential_title_objects = findall(ax, 'type', 'text', 'handlevisibility', 'off');
If you wanted to set the color of just part of the text of a title(), then you have to modify the String property of the text object, as I described in your previous https://www.mathworks.com/matlabcentral/answers/366350-how-to-change-the-color-of-the-axes-graph-numbers#answer_290461
There is no way to change a property of something without modifying its properties.

Più risposte (0)

Categorie

Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by