How do i plot and label a graph using secondary axis in matlab
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
george mobol
el 31 de Ag. de 2016
Respondida: Sean de Wolski
el 31 de Ag. de 2016
Hello, I'm trying to plot and label two vertical axes for (A and B) of different scales against the same horizontal axis (U).
U=[1 2 3 4 5 6 7 8];
A=[0.0141 0.0135 0.013 0.0125 0.012 0.0117 0.0113 0.011];
B=[0.142267 0.14271177 0.1430866 0.14334375 0.14357196 0.143885125 0.144042862 0.14423808];
0 comentarios
Respuesta aceptada
Sean de Wolski
el 31 de Ag. de 2016
U=[1 2 3 4 5 6 7 8];
A=[0.0141 0.0135 0.013 0.0125 0.012 0.0117 0.0113 0.011];
B=[0.142267 0.14271177 0.1430866 0.14334375 0.14357196 0.143885125 0.144042862 0.14423808];
yyaxis left
plot(U,A)
yyaxis right
plot(U,B)
If you're on an older release without yyaxis, then look at plotyy or upgrade.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Two y-axis 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!