How do I create a string for a plot title from one fixed string and one I get from INPUT?
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (1)
Ben Mitch
el 27 de Mayo de 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 comentario
M G
el 27 de Mayo de 2011
Categorías
Más información sobre Title en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!