changeset 28405:26d69b0a3e8d stable

legend.m: fix regression introduced in cset 8ffe43de8bfe (bug #58492) * legend.m (update_legend_position): Only call boxposition if on of plotboxaspectratiomode or dataaspectratiomode is manual.
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Thu, 04 Jun 2020 15:48:30 +0200
parents 8ffe43de8bfe
children d1ce55c5d70d 808e3964987b
files scripts/plot/appearance/legend.m
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/appearance/legend.m	Wed Jun 03 22:43:06 2020 +0200
+++ b/scripts/plot/appearance/legend.m	Thu Jun 04 15:48:30 2020 +0200
@@ -1345,10 +1345,15 @@
       return;
     endif
 
-    [li, axpos, pbam, pba] = get (hax, {"looseinset", "position", ...
-                                        "plotboxaspectratiomode", ...
-                                        "plotboxaspectratio"}){:};
-    axpos = boxposition (axpos, pba);
+    [li, axpos, pbam, pba, dam] = get (hax, {"looseinset", "position", ...
+                                             "plotboxaspectratiomode", ...
+                                             "plotboxaspectratio", ...
+                                             "dataaspectratiomode"}){:};
+    
+    if (strcmp (pbam, "manual") || strcmp (dam, "manual"))
+      axpos = boxposition (axpos, pba);
+    endif
+    
     lpos = [get(hl, "position")(1:2), sz];
 
     if (! outside)