bugGNU Octave - Bugs: bug #44405, colorbar is attached to figure...

 
 

bug #44405: colorbar is attached to figure instead of axes parent

Submitted by:  jsh <jsh>
Submitted on:  Mon 02 Mar 2015 05:28:28 AM UTC  
 
Category: GUISeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: NoneAssigned to: None
Originator Name: Open/Closed: Open
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Fri 23 Dec 2016 07:27:22 PM UTC, comment #10:

This behavior seems to be still present in Octave 4.2.0.

When running the first code line from comment #0 I still get a figure windows without any visible colorbar.

Hartmut <hardy>
Sat 07 Mar 2015 02:38:44 PM UTC, comment #9:

Yes, it's probably better to wait until 4.0.1, there are probably quite a few places that assumes uiobjects are direct children of the figures. Hope I can help out with some proper fixes/patches when I get more time available.

jsh <jsh>
Fri 06 Mar 2015 06:57:38 PM UTC, comment #8:

All that Panxto says is true--the uiXXX functions have not received a lot of testing and won't get enough before the 4.0 release. I think pushing this off until 4.0.1 is fine.

Rik <rik5>
Project Administrator
Fri 06 Mar 2015 05:30:09 PM UTC, comment #7:

Thanks for your patch. I will take time to review it next week.

There are many places where figure is assumed to be the only expected parent for an axes (subplot, legend, axes at least for the most commonly used).
More generally, uixx features haven't been really tested (before you arrive :-)) and still have to be documented so I propose to start a careful work of integration of all those features once 4.0 is out.
We will then decide (depending on the degree of complexity/ABI compatibility) if those changes go to stable (for 4.0.1 release) or to default branch. Does it sound reasonable?

Pantxo Diribarne <pantxo>
Project Member
Fri 06 Mar 2015 04:49:58 PM UTC, comment #6:

I've attached a patch with my changes but I think they're not really a proper solution, just a temporary fix.

(file #33262)

jsh <jsh>
Mon 02 Mar 2015 08:35:15 PM UTC, comment #5:

Yes trying to fix the previous bug with such an automatic trick was not a good idea (consideraing also that I had never dealt with uipanel before). I ran the colorbar demos and was content with the fact that they worked ...

Legends and colorbars both don't behave well when their corresponding axes is not children of the figure.
I'll try to provide a robust fix for those unless jsh wants to submit a patch that I can review.

Pantxo Diribarne <pantxo>
Project Member
Mon 02 Mar 2015 04:12:35 PM UTC, comment #4:

I'm adding Panxto to the CC list since he just implemented the change that uses ancestor in the graphics code.

Rik <rik5>
Project Administrator
Mon 02 Mar 2015 04:10:11 PM UTC, comment #3:

Regarding comment #2, each figure can use a different graphics toolkit for rendering and so it does need to be checked on a per figure basis.

Rik <rik5>
Project Administrator
Mon 02 Mar 2015 06:53:44 AM UTC, comment #2:

Actually, shouldn't the graphics_toolkit check be implemented differently, sort of like a global, becuase I assume you can only run one graphivs toolkit at a time, and then checking against each figure seems kind of wasteful?

jsh <jsh>
Mon 02 Mar 2015 06:48:08 AM UTC, comment #1:

Missed some things:

Line 383 in colorbar.m should be changed to

and lines 47 and 79 in _actual_axis_position_.m

should be changed to

jsh <jsh>
Mon 02 Mar 2015 05:28:28 AM UTC, original submission:

The colorbar is always attached to the root figure instead of the axis parent. This is incorrect f for example the axes is a child of an uipanel.

I get the correct behavior if I in colorbar.m change the lines 191-195 from

to

This does not seem to be a proper fix though, and there might be configurations where it fails but normal axis in figure and axis in uipanel works.

jsh <jsh>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #33262:  colorbar.diff added by jsh (3KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by hardy (Posted a comment)
  • -unavailable- added by pantxo (Posted a comment)
  • -unavailable- added by rik5
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by jsh (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 06 Mar 2015 04:49:58 PM UTCjshAttached File-=>Added colorbar.diff, #33262
    Mon 02 Mar 2015 04:12:35 PM UTCrik5Carbon-Copy-=>Added pantxo

    Back to the top


    Powered by Savane 3.1-cleanup1