Borrar filtros
Borrar filtros

Adding legend to a plot

1 visualización (últimos 30 días)
Mike
Mike el 5 de Nov. de 2013
Comentada: Mike el 5 de Nov. de 2013
For a matrix where A= [ 1 2 3 4 5 ; 6 7 8 9 10]; the first column is the path ID and columns 2 through 5 is the path.
I want to plot these 2 lines on the same chart and use "1" and "6" as their legend ID's. Is this possible?
I used plot( x axis vector, A). Is there an option to specify the legend based on A?
  2 comentarios
Azzi Abdelmalek
Azzi Abdelmalek el 5 de Nov. de 2013
What do you want to plot?
Mike
Mike el 5 de Nov. de 2013
ahh I got it. I separated the matrix and used legend( path_ID (k)). Thanks

Iniciar sesión para comentar.

Respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by