octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #65904] copyobj figure missing legend markers


From: Al Cabato
Subject: [Octave-bug-tracker] [bug #65904] copyobj figure missing legend markers
Date: Thu, 27 Jun 2024 12:03:30 -0400 (EDT)

Follow-up Comment #2, bug #65904 (group octave):

Legend markers are handled specially in legend.m and their handles are not
visible.  They are simply found with the property markertruesize.

In hdl2struct.m, these need to be added to the regular child lists for the
legend, and not marked as special.

These changes seem to work for me:


@@ -62,6 +62,8 @@ function s = hdl2struct (h)
         ## Check for polar plots with special "polar_grid" object
         ## FIXME: A hack to fix bug #62093.
         kids = [kids; findall(h, "tag", "polar_grid")];
+        ## Add legend markers which are normally hidden
+        kids = [kids; findall(h, '-depth', 1, 'type', 'line', '-property',
'markertruesize')];
       endif
 
       nkids = length (kids);
@@ -131,6 +133,10 @@ function hlist = getspecial (h)
   hlist = [];
 
   regkids = get (h, "children");
+  ## Add legend markers which are normally hidden to regkids
+  if ( strcmp (get (h, "tag"), 'legend') )
+    regkids = [regkids; findall(h, 'type', 'line', '-property',
'markertruesize')];
+  endif
   ## inline version of allchild() for performance
   set (0, "showhiddenhandles", "on");
   allkids = get (h, "children");




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?65904>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]