How do I create a string for a plot title from one fixed string and one I get from INPUT?
Afficher commentaires plus anciens
I have a problem in plot's titles. I do the following:
name = input('plot''s title');
set(gcf,'NumberTitle','off');
set(gcf,'Name',name);
This is perfectly OK and it gives the name that is already input as a title, but I want to have a title in which one part is always fix and the other part is the name that I can change it each time. For example I would like to have titles like this:
name1_name2
name1_name3
name1_name4
Réponse acceptée
Plus de réponses (1)
Ben Mitch
le 27 Mai 2011
In addition to what Arnaud suggests, I also sometimes find it useful to keep a bit of name in the plot and change only the second bit when you update it. For example, use
set(gcf, 'Name', ['My Application: My Document']);
to set the title initially, then update the 'document name' (or whatever) using something like this:
name = get(gcf, 'Name');
set(gcf, 'Name', [name(1:find(name == ':')+1) 'My New Document']);
1 commentaire
M G
le 27 Mai 2011
Catégories
En savoir plus sur Title dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!