using area function - drawing below 0 of y axes
조회 수: 8 (최근 30일)
이전 댓글 표시
Hi,
I have some graph. I'd like to plot an area (the orange one). I'm using area function for positive values. how can I use it for both positive and negative?
It shall be dynamically as each time the graph is changing based on the data.
The maximum and minimum values may be the max and min of the graph.
댓글 수: 0
답변 (2개)
Jan
2021년 5월 31일
This sounds like a job for a patch:
figure;
axes('XLim', [0, 10], 'Ylim', [-5, 5]);
patch([1,2,2,1], [-3,-3, 4,4], rand(1,3))
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Polygons에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!