Color code with dash line
51 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
UTS
el 24 de Ag. de 2014
Editada: Image Analyst
el 24 de Ag. de 2014
Hi,
Could you please tell me the correct code for the dash line with specific color
For colors with dash line such as red and blue, the code can be written as follows:
plot (x,y, 'r:');
my question here is about the above command but for specific color code as stated below:
plot (x,y, 'color',[0 0.5 0]);
Thanks,
0 comentarios
Respuesta aceptada
Matz Johansson Bergström
el 24 de Ag. de 2014
x=1:10; plot(x, cos(x), ':','color',[0,0.5,0],'linewidth',3)
2 comentarios
Matz Johansson Bergström
el 24 de Ag. de 2014
I added 'linewidth' because it is difficult to see otherwise. I don't like the dash, I use -- instead, looks nicer when you use a larger linewidth.
Image Analyst
el 24 de Ag. de 2014
Editada: Image Analyst
el 24 de Ag. de 2014
UTS's "Answer" moved here since it's not an "Answer" to the original post:
Thanks a lot.
Más respuestas (0)
Ver también
Categorías
Más información sobre Annotations 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!