Azzera filtri
Azzera filtri

Change the color of streamslice

26 visualizzazioni (ultimi 30 giorni)
Shan  Chu
Shan Chu il 3 Feb 2017
Commentato: Jose Luis il 25 Apr 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

Risposta accettata

Adam
Adam il 3 Feb 2017
Modificato: Adam il 3 Feb 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

Più risposte (1)

Taylor Ward
Taylor Ward il 24 Mag 2018
what does h signify?
  1 Commento
Jose Luis
Jose Luis il 25 Apr 2023
its just used so you can use set, because you need a variable to assign the color.

Accedi per commentare.

Categorie

Scopri di più su Colormaps in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by