Patch does not fill the area in the graph

조회 수: 4 (최근 30일)
Gianmarco Broilo
Gianmarco Broilo 2021년 11월 25일
답변: Image Analyst 2021년 11월 25일
Hello! I am trying to fill the area under a plot using patch
the X values are stored in a 1x1823 matrix called serrN_eg and the Y values are stored in a matrix called closestapproach which is also 1x1823. The problem is that the area is filled diagonally but not the area under the line. The command I am using is:
patch(serrN_eg(1:1823),closestapproach(1:1823)./1e3-2634,'blue')

답변 (1개)

Image Analyst
Image Analyst 2021년 11월 25일
We don't have your data. Make sure that the (0,0) point is in your data sent to patch(). Looks like now, that point is not in there so the patch does not run over there to include it in the colored region.

카테고리

Help CenterFile Exchange에서 Polygons에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by