bugGNU Octave - Bugs: bug #65734, some bar plot updates don't...

 
 

bug #65734: some bar plot updates don't properly update axes and labels

Submitter:  Nicholas Jankowski <nrjank>
Submitted:  Mon 13 May 2024 05:16:33 PM UTC
   
 
Category:  Plotting Severity:  2 - Minor
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 9.1.0 Release: 
Operating System:  * Any Fixed Release:  9.3.0
Planned Release:  9.3.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 25 Oct 2024 09:44:35 PM UTC, comment #3: 

Changeset looks good.  Marking as Fixed and closing report.

Rik <rik5>
Group administrator
Wed 16 Oct 2024 10:23:42 PM UTC, comment #2: 

patch pushed to stable as

https://hg.savannah.gnu.org/hgweb/octave/rev/c46a83939799

Fix just involved making sure a vector xdata input is a column vector before applying the rest of the update_axes_limits function.  seems that set(hax, 'xdata', [1 2 3]) stores as a row vector which cause it to only read the column 1 value.

small fix, added BISTs to bar and barh, note to NEWS.  marking as Ready for test.

Nicholas Jankowski <nrjank>
Group Member
Mon 14 Oct 2024 05:51:00 PM UTC, comment #1: 

recent push to bug #65734 to fix a number of horizontal bar plot issues seems to have also fixed #1.  so that seems to just leave #2  where labels aren't updated when other changes are made. xtests and fix for this are still pending.

Nicholas Jankowski <nrjank>
Group Member
Mon 13 May 2024 05:16:33 PM UTC, original submission:  

while writing bar/barh tests for bug #65671, i came upon a few cases where changes to bar data do not trigger needed updates to axes properties:

1) changing to horizontal results in incorrect yaxis ticks/labels
h = bar (2:4);
set (h, 'horizontal', 'on');

result should be identical, or close too h = barh(2:4).  vertical axis ticks/labels are not updated however, leaving a number of intermediate values.  see attached figure comparing both for octave 9.1.0 and matlab. (results are independent of the pending patch for bug #65671)

2) changing xdata moves the bars but fails to update xlim and xticks to match:

hf = figure(); hax = axes('parent',hf);
h = bar (hax, 2:4);
set (h, 'xdata', [3:5]')  # stored vert, but horiz no difference
set (hax, 'xlim', [2.5 5.5]);

as shown in the figure next to a matlab comparison, setting xdata fails to update xlim to show the bars, and even with a manual xlim the new xaxis ticks/lables have not been created.

since changing xdata calls h= bar () again, not sure why the axis setting isn't occurring along with it.

will be writing up xtest BISTs to capture these along with tests for bug #65671. then will give these a look after that one's finished.


Nicholas Jankowski <nrjank>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #56041:  bar+xdatachange.PNG added by nrjank (42KiB - image/png)

 

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 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-10-25 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
        Fixed ReleaseNone 9.3.0
    2024-10-16 nrjank StatusNone Ready For Test
        Planned ReleaseNone 9.3.0
    2024-05-13 nrjank Summarysame bar plot updates don't properly update axes and labels some bar plot updates don't properly update axes and labels
    2024-05-13 nrjank Attached File- Added bar+horizotal_yaxistickslabels.PNG, #56040
        Attached File- Added bar+xdatachange.PNG, #56041

    Back to the top

    Powered by Savane 3.15-f85b.
    Corresponding source code