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.
Hatchfill function not working
3 次查看(过去 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 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Histograms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!