Coloring with coordinates.

조회 수: 1 (최근 30일)
Kimhim Chhay
Kimhim Chhay 2019년 11월 19일
댓글: Kimhim Chhay 2019년 11월 21일
Hi I have a some x data with upper and lower y data and wanted to color the enclosed section that is made.
Here is the code so far.
x_data = [3/8 4 8 16 30 50 100];
uppery = [100 100 100 85 60 30 10];
lowery = [100 95 80 50 25 5 0];
semilogx(x_data, uppery, x_data, lowery);

채택된 답변

KSSV
KSSV 2019년 11월 20일
편집: KSSV 2019년 11월 20일
x_data = [3/8 4 8 16 30 50 100];
uppery = [100 100 100 85 60 30 10];
lowery = [100 95 80 50 25 5 0];
x = [x_data fliplr(x_data)] ;
y = [uppery fliplr(lowery)] ;
semilogx(x,y);
hold on
fill(10.^log10(x),y,'y')

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by