Borrar filtros
Borrar filtros

Add title to current axes

27 visualizaciones (últimos 30 días)
Ashish Sheikh
Ashish Sheikh el 24 de Feb. de 2015
Comentada: dpb el 25 de Feb. de 2015
How one can add title to the plot without using "TITLE" Command???? You cannot even use the figure GUI ?
Can anyone give me an answer?
  3 comentarios
Ashish Sheikh
Ashish Sheikh el 25 de Feb. de 2015
Because This was asked in one of my interviews. I know only these two ways to give title to a plot ?
I am curiosu to know if there is any other way??
Guillaume
Guillaume el 25 de Feb. de 2015
What a stupid interview question! Why not use the tool that's specifically designed for the job?

Iniciar sesión para comentar.

Respuesta aceptada

Jos (10584)
Jos (10584) el 25 de Feb. de 2015
set(get(gca, 'title'), 'string', 'My First Title')
  2 comentarios
Ashish Sheikh
Ashish Sheikh el 25 de Feb. de 2015
I think this might be an answer for the question i have asked ... Thanksss
dpb
dpb el 25 de Feb. de 2015
Still, if you can use set, why can't you use title? It also can accept a handle and is less complex syntax.
title(gca,'Your title text')

Iniciar sesión para comentar.

Más respuestas (1)

dpb
dpb el 25 de Feb. de 2015
Just reread the question -- guess I didn't follow before. Yes, "TITLE" is included as an option under the "Insert" menu item on figures.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by