How to add legends in graphs generated within a for loop.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Ali Baig
el 19 de Jul. de 2017
Respondida: Walter Roberson
el 19 de Jul. de 2017
I am writing a program in which graphs are generated within a for loop. How can I add legends for all the graphs.
for jj = 1 : 1 : NOE
ElementShape = dispVector( jj, 1) * shapeFunction1 + dispVector( jj+1, 1) * shapeFunction2;
range = ( jj - 1) * h : stepSize : jj * h;
totalShape = [totalShape, ElementShape];
totallength = [totallength, range];
plot(totallength, totalShape)
hold on
end
0 comentarios
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Legend en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!