bugGNU Octave - Bugs: bug #67017, bar graph - baseline doesn't track...

 
 

bug #67017: bar graph - baseline doesn't track graph parent changes

Submitter:  Nicholas Jankowski <nrjank>
Submitted:  Fri 11 Apr 2025 06:59:15 PM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  In Progress Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * 10.1.0 Release: 
Operating System:  * Any Fixed Release:  None
Planned Release:  11.1.0 (current default)
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 18 Apr 2025 02:30:11 AM UTC, comment #1: 

I checked in a change that attaches the "baseline" line object to the first hggroup in the plot.  With that change, the line object at least follows the bar plot when it is re-parented.  I also did a lot of other cleanup which should improve performance.  See cset a3f7c8979e39.

Someone still needs to add a listener on the "parent" property of the hggroup which deletes the old listeners on the old axes and recreates them on the new axes whenever a re-parent operation is performed.

Rik <rik5>
Group administrator
Fri 11 Apr 2025 06:59:15 PM UTC, original submission:  

as discussed over in bug #67006, bar graphs create a separate baseline object on the parent axes that is supposed to track changes to the bar graph and update accordingly.  Some issues with this were addressed over in that report, but it was noted that there is no listener for the parent of the bar graph, and a change to the parent is not tracked by the baseline.  This means moving the bar graph from one figure to another will leave the baseline behind. 

There was a thought that this sort of behavior might exist in other objects as well, so a quick plot object review might be in order for this kind of behavior, and this bug report could be broadened to capture them too if they exist. 

to reproduce with bar:

f1 = figure(1);
f2 = figure(2);
hax1 = axes("parent", f1)
hax2 = axes("parent", f2)
bp = bar (hax1, [1 2 3]);
bl = get (bp, "baseline");
get (bp, "parent") # should be hax1
get (bl, "parent") # should be hax1
set (bp, "parent", hax2) # bar plot moves to hax2 in f2
get (bp, "parent") # should be hax2
get (bl, "parent") # should be hax2, but is still hax1
set (bl, "ydata", [0 1]) # deform bl to make it obvious


This should simply be a matter of adding a baseline listener to the parent of the bar plot, and copying any changes, but might also have to be careful about deleting any listeners as was discovered in bug #67006.

Nicholas Jankowski <nrjank>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by nrjank (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2025-04-18 rik5 StatusConfirmed In Progress
        Planned ReleaseNone 11.1.0 (current default)

    Back to the top

    Powered by Savane 3.14-962f.
    Corresponding source code