How do you change the color of legend lines? How do you make x axis go from 0 to 2pi?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
plot(rad1, ’red’)
hold on
plot(in, ‘yellow’)
plot(in1, ‘blue’)
plot(in2, ‘green’)
legend({ ‘\theta3(rad)’, ‘r3(in)’, ‘r4(in)’, ‘r5(in)’ })
1 comentario
Wan Ji
el 28 de Ag. de 2021
Would you please write your code down precisely and state detailly about what you wanna do?
Respuestas (2)
dpb
el 28 de Ag. de 2021
- Define the x vector to plot against; the one numeric argument form of plot, as documented, plots against the ordinal position, or
- Set the tick labels as desired independently of the value to the desired values. The first is generally simpler.
legend() will use the linestyle of the lines; you've also not provided a linestyle and so the points may not show up depending upon the actual number in each of the above instructions.
0 comentarios
Cris LaPierre
el 28 de Ag. de 2021
It sounds like you would be well served by going through Ch 9 of MATLAB Onramp. It covers plotting. See the xlim function for specifying axis limits.
0 comentarios
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!