Borrar filtros
Borrar filtros

how to write in the graph

1 visualización (últimos 30 días)
Elysi Cochin
Elysi Cochin el 22 de Mzo. de 2013
Is it possible to write something on a graph.... that is i plot a graph and in its x - axis it is image category.... i have 10 categories.... so i wanted to write in the graph what each category is.... can someone show me how to do it.... please do reply.....

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 22 de Mzo. de 2013
Editada: Azzi Abdelmalek el 22 de Mzo. de 2013
You can use legend
  1 comentario
Azzi Abdelmalek
Azzi Abdelmalek el 22 de Mzo. de 2013
Editada: Azzi Abdelmalek el 22 de Mzo. de 2013
Example
l={'Mountain','Seashore','A','B','Car'}
plot(1:5,sin(1:5))
set(gca,'xtick',1:5,'xticklabel',l)

Iniciar sesión para comentar.

Más respuestas (1)

Image Analyst
Image Analyst el 22 de Mzo. de 2013
You can also use text() if you want to write something that doesn't look like a legend. With text() you also specify the exact location where you want the text to appear.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by