Change the color of streamslice

61 visualizaciones (últimos 30 días)
Shan  Chu
Shan Chu el 3 de Feb. de 2017
Comentada: Jose Luis el 25 de Abr. de 2023
Dear all, I am using the streamslice to plot the Poynting vector but the default color of MATLAB is blue and I don't really like it. So, how could I change it to other color, e.g., black. Thanks

Respuesta aceptada

Adam
Adam el 3 de Feb. de 2017
Editada: Adam el 3 de Feb. de 2017
load wind
figure
h = streamslice(x,y,z,u,v,w,[],[],[5]);
axis tight
set( h, 'Color', [0 0 0] ) % or set( h, 'Color', 'k' ) if you prefer
to expand on the example given in
doc streamslice

Más respuestas (1)

Taylor Ward
Taylor Ward el 24 de Mayo de 2018
what does h signify?
  1 comentario
Jose Luis
Jose Luis el 25 de Abr. de 2023
its just used so you can use set, because you need a variable to assign the color.

Iniciar sesión para comentar.

Categorías

Más información sobre Colormaps en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by