Hatchfill function not working

9 visualizaciones (últimos 30 días)
Minas Emiris
Minas Emiris el 28 de Abr. de 2020
Editada: DGM el 9 de Ag. de 2022
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'.

Respuestas (1)

DGM
DGM el 9 de Ag. de 2022
Editada: DGM el 9 de Ag. de 2022
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.

Categorías

Más información sobre Histograms en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by