Plot AREA limit in matlab

조회 수: 4 (최근 30일)
Giovanni Gardan
Giovanni Gardan 2020년 8월 6일
답변: Star Strider 2020년 8월 6일
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