Coloring with coordinates.

1 visualización (últimos 30 días)
Kimhim Chhay
Kimhim Chhay el 19 de Nov. de 2019
Comentada: Kimhim Chhay el 21 de Nov. de 2019
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);

Respuesta aceptada

KSSV
KSSV el 20 de Nov. de 2019
Editada: KSSV el 20 de Nov. de 2019
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')

Más respuestas (0)

Categorías

Más información sobre Lighting, Transparency, and Shading 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!

Translated by