Plot AREA limit in matlab

6 visualizaciones (últimos 30 días)
Giovanni Gardan
Giovanni Gardan el 6 de Ag. de 2020
Respondida: Star Strider el 6 de Ag. de 2020
I have two vectors (n and abb_per) and I'd like to make an area plot. I'd like to make the upper limit of the graphic as 100 (and not the bigger number of abb_per).
I tried to use the command axis but doesn't work. How could I do?
n = [18 19 39 60 130 797 2060];
ren = [0.081423 0.098465 0.09714 0.139722 0.174535 1.196584 2.731867];
gar = [0.03305 0.034039 0.033889 0.040322 0.032641 0.13198 1.0767];
abb_per = ((ren-gar)./ren)'*100;
area(n,abb_per)
axis[(0 2060 0 100)]

Respuesta aceptada

Star Strider
Star Strider el 6 de Ag. de 2020
If you want the area between ‘abb_per’ and 100 filled, use the patch function.
Try this:
figure
patch([n fliplr(n)],[abb_per; ones(size(abb_per))*100].','b')
producing:
.

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots 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