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

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

[Octave-bug-tracker] [bug #57262] legend incorrect after some of plot ob


From: Rik
Subject: [Octave-bug-tracker] [bug #57262] legend incorrect after some of plot objects have been deleted
Date: Mon, 25 Nov 2019 13:25:11 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

Follow-up Comment #1, bug #57262 (project octave):

If I had to guess, this is likely because the handle for the graphics object
to the marker is not getting added to the variable hitem.  Either it should be
added to hitem, or an hggroup should be created which contains the line object
and marker object for the legend key so that only one handle needs to be
communicated in hitem.

The code begins at line 942 in legend.m:


switch (typ)
  case "line"
    persistent lprops = {"color", "linestyle", "linewidth"};
    persistent mprops = {"color", "marker", "markeredgecolor", ...
                         "markerfacecolor", "markersize"};

    ## Main line
    vals = get (hplt, lprops);
    hitem = __go_line__ (hl, [lprops; vals]{:});

    ## Additional line for the marker
    vals = get (hplt, mprops);
    hmarker = __go_line__ (hl, "handlevisibility", "off", ...
                               "xdata", 0, "ydata", 0, [mprops; vals]{:});
    update_marker_cb (hmarker);

  case {"patch", "surface"}
    persistent pprops = {"edgecolor", "facecolor", "cdata", ...
                         "linestyle", "linewidth", ...
                         "marker", "markeredgecolor", ...
                         "markerfacecolor", "markersize"};

    vals = get (hplt, pprops);

    hitem = __go_patch__ (hl, [pprops; vals]{:});

endswitch

htxt = __go_text__ (hl, "string", str, [txtprops(:)'; txtvals(:)']{:});
set (base_hplt, "displayname", str);

addproperty ("peer_object", htxt, "double", base_hplt);
addproperty ("peer_object", hitem, "double", base_hplt);




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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