bugGNU Octave - Bugs: bug #46025, Make display of coordinates in...


bug #46025: Make display of coordinates in figure's status bar optional

Submitter:  Guillaume <gyom>
Submitted:  Tue 22 Sep 2015 01:32:45 PM UTC
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Guillaume Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup

Jump to the original submission

Mon 28 Sep 2015 05:25:19 PM UTC, comment #16: 
Pantxo Diribarne <pantxo>
Group Member
Sun 27 Sep 2015 03:19:29 PM UTC, comment #15: 

I attached a simple patch that fixes the issue (in comment #13) for me.

(file #34996)

Pantxo Diribarne <pantxo>
Group Member
Fri 25 Sep 2015 05:52:14 PM UTC, comment #14: 

It seems that the interaction between toolbar and uicontrol is even stranger.  If I simpply amend the code in comment #13 to turn off and then back on the toolbar then it displays correctly.

F = figure('toolbar','figure');
set (F, 'toolbar', 'none');
set (F, 'toolbar', 'figure');

This suggests an easy workaround which is to switch the 'toolbar' property to 'figure' after the creation of the uicontrol object.  This also works for me.

F = figure;
set (F, 'toolbar', 'figure');

Rik <rik5>
Group administrator
Thu 24 Sep 2015 05:30:16 PM UTC, comment #13: 

@Panxto: thanks, I hadn't realized MATLAB was doing the same - odd.

So the remaining issue is that the toolbar disappears even if the figure's 'toolbar' property is set to 'figure':

F = figure('toolbar','figure');

Guillaume <gyom>
Wed 23 Sep 2015 09:31:49 PM UTC, comment #12: 

@Avinoam: Thanks, I had just noticed. This is the kind of thing I can get stuck with for loooooooooong time.

Pantxo Diribarne <pantxo>
Group Member
Wed 23 Sep 2015 08:27:42 PM UTC, comment #11: 

@Panxto: (commnet#7): I also don't receive email notifications from savanah. Gmail puts them in the spam folder

Avinoam Kalma <avinoam>
Group Member
Wed 23 Sep 2015 02:05:45 PM UTC, comment #10: 

Yes, this is intended for compatibility with ML [1], but I can't find a sensible reason for that.

[1] http://undocumentedmatlab.com/blog/uicontrol-side-effect-removing-figure-toolbar

Pantxo Diribarne <pantxo>
Group Member
Wed 23 Sep 2015 11:52:48 AM UTC, comment #9: 

Just noticed something related...

If you create a figure, it will have a status bar but as soon as you add a uicontrol in it, it removes the status bar (and resize the window):

>> F = figure
>> uicontrol(F,'Style','Pushbutton','String','OK')

Is it the expected behavior?

Guillaume <gyom>
Tue 22 Sep 2015 04:49:20 PM UTC, comment #8: 

@Panxto: I'm getting e-mail notifications.

I changed the patch to update the top and bottom corners separately.  I pushed it here http://hg.savannah.gnu.org/hgweb/octave/rev/b6ae0ef9327e.

Closing report.

Rik <rik5>
Group administrator
Tue 22 Sep 2015 04:08:02 PM UTC, comment #7: 

the reference:
[1] http://doc.qt.io/qt-4.8/qrect.html#adjust

BTW I currently don't receive email notifications from savanah. Is it only me?

Pantxo Diribarne <pantxo>
Group Member
Tue 22 Sep 2015 04:06:32 PM UTC, comment #6: 

@Rik: the way you adjust the size of the window is not correct (see [1]). The presence of the statusbar should affect the bottom right corner (dy2) while the statusbar should affect the top left corner(dy1). This is important I think in order to have the central canvas position unaffected when hiding/displaying the statusbar and toolbar ("position" property).

Pantxo Diribarne <pantxo>
Group Member
Tue 22 Sep 2015 03:23:22 PM UTC, comment #5: 

Thanks Rik, I tried your patch and it works as expected for my purpose.

Guillaume <gyom>
Tue 22 Sep 2015 02:51:25 PM UTC, comment #4: 

Attached is a quick patch that hides all the "toolbar" objects when the figure property for toolbar is set to "none".  This is Matlab compatible in that Matlab users will expect all the window decorations to be removed when they set the toolbar to "none".

@Pantxo: Can you take a look at it?

(file #34951)

Rik <rik5>
Group administrator
Tue 22 Sep 2015 02:29:24 PM UTC, comment #3: 

@Rik: I think this may be true in octave 4.0 but it has been fixed in stable. For me the following works fine to display/hide the toolbar:

plot (1:10)
set (gcf, "toolbar", "none") % hide the toolbar
set (gcf, "toolbar", "auto") % show it again

We could eventually add a "statusbar" property that works essentially as the "toolbar" property.

On the other hand I'd also like to implement something more useful like a "statusbarfcn" that could be used to display mouse coordinates but also any useful info like impixelinfo (see http://octave.1599824.n4.nabble.com/Re-impixelinfo-tc4672469.html)

Pantxo Diribarne <pantxo>
Group Member
Tue 22 Sep 2015 02:19:19 PM UTC, comment #2: 

Actually, the "toolbar" property is working in Qt but is only removing the top toolbar, and not the bottom display area.

Rik <rik5>
Group administrator
Tue 22 Sep 2015 02:09:09 PM UTC, comment #1: 

What would be even better is to implement true control over the toolbar.  The figure object has two properties, "menubar" and "toolbar".  In Matlab, you can set one or both of these properties to "none" to remove the object.  In Octave, only the menubar can be made to disappear.

Rik <rik5>
Group administrator
Tue 22 Sep 2015 01:32:45 PM UTC, original submission:  

In changeset 062422f2e399 (discussed in #44959) was added the creation of a status bar in all Qt figures to display current coordinates. Not all figures contain axes and even if so, native coordinates are not necessarily useful or making sense.

Would it be possible to make this feature optional and disabled by default?

Guillaume <gyom>


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

Attach Files:

Attached Files
file #34996:  fix_newtoolbar_2.patch added by pantxo (1010B - application/x-download)
file #34951:  statusbar.diffs added by rik5 (2KiB - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by avinoam (Posted a comment)
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by rik5
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by gyom (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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-09-27 pantxo Attached File- Added fix_newtoolbar_2.patch, #34996
    2015-09-22 rik5 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2015-09-22 rik5 Attached File- Added statusbar.diffs, #34951
        StatusNone Patch Submitted
    2015-09-22 rik5 Carbon-Copy- Added pantxo

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code