# HG changeset patch # User Pantxo Diribarne # Date 1574929482 -3600 # Node ID 8ac3222bf9518e1ccf25c3336c3fbfbe253da605 # Parent 597e50809a9c4dfcc558b5577c5e05ea445326a1 legend.m: reset both plotyy axes data when legend is deleted (bug #57319) * legend.m (delete_legend_cb): Reset both plotyy axes data. diff -r 597e50809a9c -r 8ac3222bf951 scripts/plot/appearance/legend.m --- a/scripts/plot/appearance/legend.m Wed Nov 27 08:16:33 2019 -0800 +++ b/scripts/plot/appearance/legend.m Thu Nov 28 09:24:42 2019 +0100 @@ -406,12 +406,13 @@ reset_cb ([], [], hl, false); - hax = getappdata (hl, "__axes_handle__")(1); - units = get (hax, "units"); - set (hax, "units", getappdata (hl, "__original_units__"), - "looseinset", getappdata (hl, "__original_looseinset__"), - "units", units, - "__legend_handle__", []); + hax = getappdata (hl, "__axes_handle__"); + for h = hax(:)' + units = get (h, "units"); + set (h, "units", getappdata (hl, "__original_units__"), ... + "looseinset", getappdata (hl, "__original_looseinset__"), ... + "units", units, "__legend_handle__", []); + endfor endfunction