Plot AREA limit in matlab

4 次查看(过去 30 天)
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)]

采纳的回答

Star Strider
Star Strider 2020-8-6
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:
.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Polygons 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by