Hatchfill function not working
조회 수: 7 (최근 30일)
이전 댓글 표시
Hi all,
I just downloaded hatchfill to hatch the area under a histogram, as shown in: <LINK>. However, when running the script, I get the following error message:
Index exceeds the number of array elements (0).
Error in hatchfill (line 96)
hax = get(A(1),'parent');
Error in Hatching_Histograms (line 58)
hh1 = hatchfill(hPatch1, 'single', -45, 3);
Undefined function 'applyhatch_pluscolor' for input arguments of type 'matlab.ui.Figure'.
Error in Hatching_Histograms (line 80)
applyhatch_pluscolor(fH, '\-x.', 0, [1 0 1 0], jet(4));
And I am not sure how to fix it. I am attatching the function hatchfill and the code from the aforementioned link, which I have named 'Hatching_Histograms.m'.
댓글 수: 0
답변 (1개)
DGM
2022년 8월 9일
편집: DGM
2022년 8월 9일
Both hatchfill() and applyhatch_pluscolor have been unmaintained for a decade now and predate the current graphics system. If you want to use either, you will have to go through and rewrite them to be compatible. There are more recent alternatives, though I'm not familiar with them all. See this answer and the linked threads as a starting point.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Histograms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!