help-octave
[Top][All Lists]
Advanced

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

Matlab-to-Octave - figure() debugging


From: Yanga
Subject: Matlab-to-Octave - figure() debugging
Date: Thu, 7 Apr 2016 04:46:41 -0700 (PDT)

Hello,
I'm using an open source script that is written for Matlab, and I would like
convert over to using the code in Octave.  I have done an M-to-O conversion
before and I appreciate that it can be difficult to debug.

The error message that I receive at present is:
========================================
warning: set: allowing menu to match figure property menubar
warning: called from
    figure at line 86 column 7
    Fatlab>setup_gui at line 69 column 12
    Fatlab at line 21 column 5
error: get: unknown figure property javaframe
error: called from
    change_icon at line 6 column 11
    Fatlab>setup_gui at line 71 column 5
    Fatlab at line 21 column 5
>>
========================================

Extracts from the script are as follows:
Line 21:
setup_gui('',ver);

Line 48:
function setup_gui(inp_file,ver)

Line 69/70:
h.fig  = figure('name','Fatlab
','menu','none','NumberTitle','off','units','characters','position', [4 10
250 55],...
'color',grey,'resizefcn',@cb_resize,'toolbar','figure'); 

Line 71:
change_icon(h.fig,'icon.png');

Line 239:
end  % end of function setup_gui

Line 447-484:
function cb_resize(~,~)
    
    h = getappdata(gcf,'handles');
    
    set(gcf,'units','characters');
    fig_size = get(gcf, 'pos');
    set(gcf,'units','pixels');
    
    width  = fig_size(3);
    height = fig_size(4);
    
    if ~isempty(h)
        hpan_pos = get(h.pan,'pos');
        hpan_pos(1) = width-110;
        hpan_pos(4) = height;
        set(h.pan,'pos',hpan_pos);

        hipan_pos = get(h.ipan,'pos');
        hipan_pos(2) = height-17.5;
        set(h.ipan,'pos',hipan_pos);

        htabgr_pos = get(h.tabgr,'pos');
        htabgr_pos(2) = hipan_pos(2)-31;
        set(h.tabgr,'pos',htabgr_pos);

        haxp_pos = get(h.axp,'pos');
        haxp_pos(3) = width-110;
        haxp_pos(4) = height;
        set(h.axp,'pos',haxp_pos);

        h.cb = findobj('tag','Colorbar');
        if ~isempty(h.cb)
            cb_pos = get(h.cb,'pos');
            cb_pos(2) = height-30;
            set(h.cb,'pos',cb_pos);
        end
    end
end


Where in the Octave installation can I find the code for the 'figure' &
'change_icon' functions?
(so that I can perhaps get a clue of what is getting tripping over)

Is the "error: get: unknown figure property javaframe" emanating from the
"function cb_resize(~,~)" perhaps?

Are there common difficulties experienced with figure() calls written for
Matlab and run in Octave?

I can't find any occurrence of javaframe in the Matlab file; is javaframe a
known keyword?

I appreciate any pointers for debugging this.

Tim





--
View this message in context: 
http://octave.1599824.n4.nabble.com/Matlab-to-Octave-figure-debugging-tp4676125.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

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