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

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

[Octave-bug-tracker] [bug #44672] Difference with figure/uicontrol betwe


From: Guillaume
Subject: [Octave-bug-tracker] [bug #44672] Difference with figure/uicontrol between Octave and MATLAB
Date: Mon, 30 Mar 2015 18:27:11 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0

URL:
  <http://savannah.gnu.org/bugs/?44672>

                 Summary: Difference with figure/uicontrol between Octave and
MATLAB
                 Project: GNU Octave
            Submitted by: gyom
            Submitted on: Mon 30 Mar 2015 06:27:10 PM GMT
                Category: Plotting
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: Guillaume
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

I observed small differences in behaviour or syntax between Octave and MATLAB
regarding figure/uicontrol - they sometimes correspond to undocumented
features so I understand if they were not implemented in Octave but I thought
some of them might still be relevant. Let me know if I should write several
bug reports instead or wait for 4.0 release before doing so.

* Octave does not return all the handles of the default menu from a new
figure:


findall(figure)


i.e. Octave returns the handle of the figure only, while MATLAB returns the
handles of the figure, menu and toolbar items.

* Difference between gco and gcbo:


F = figure;
uicontrol(F,'Style','pushbutton','Callback','disp(gco),disp(gcbo)');


at each click on the button, MATLAB displays the handle of the pushbutton for
both gco and gcbo while Octave returns [] and the handle of the pushbutton,
unless you click in the figure and then gco is the handle of the figure.

* Numerical content of the 'String' property of a uicontrol:


F = figure;
uicontrol(F,'Style','Edit','String',3);


Octave returns an error as it expects a string while MATLAB will automatically
convert to a string (with a call to num2str I presume).

* Interpretation of '&' in the 'String' property of a uicontrol:


F = figure;
uicontrol(F,'Style','pushbutton','String','A&B');


In Octave, it creates an underlines B (as it would do for a uimenu, and
enables Alt-B) while on MATLAB, it displays 'A&B'.

* Options for figure/uicontrol/... can be provided as property/value pairs
and/or a structure:


figure('Color',[0.5 0.5
0.5],'Name','Title','Tag','fig_tag','Pointer','Watch')
figure('Color',[0.5 0.5
0.5],struct('Name','Title','Tag','fig_tag'),'Pointer','Watch')


MATLAB is fine with both syntaxes (I could not find it mentioned in the
documentation though) while Octave only acceps the first one.





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44672>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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