Hatchfill function not working

9 ビュー (過去 30 日間)
Minas Emiris
Minas Emiris 2020 年 4 月 28 日
編集済み: DGM 2022 年 8 月 9 日
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'.

回答 (1 件)

DGM
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.

カテゴリ

Help Center および File ExchangeHistograms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by