Change the color of streamslice

조회 수: 15 (최근 30일)
Shan  Chu
Shan Chu 2017년 2월 3일
댓글: Jose Luis 2023년 4월 25일
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

채택된 답변

Adam
Adam 2017년 2월 3일
편집: Adam 2017년 2월 3일
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

추가 답변 (1개)

Taylor Ward
Taylor Ward 2018년 5월 24일
what does h signify?
  댓글 수: 1
Jose Luis
Jose Luis 2023년 4월 25일
its just used so you can use set, because you need a variable to assign the color.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by