Menu

#105 plot.m spawns warning about __nxtplt__.m

open
nobody
None
2
2007-04-22
2007-04-21
gbarrick
No

<subject: plot.m spawns warning about __nxtplt__.m >

2007.04.21.18:22:07 UT

Hello octplot guys,

My system is a Dell OptiPlex GX260 (2400 MHz) with
an Intel 82845G/GL/GE/PE/GV graphics card. I have WinXP SP2
with CygWin 1.5.24-2 that includes octave-2.1.73 as well
as octave-forge and octave-headers. I'm using the svn-448
and compiling with gcc-3.3.3-3.

There seems to be a minor error in the function
__nxtplt__.m when it is called from plot.m. Unfortunately,
this is an intermittent error. It occurs only on the my
***first*** call of plot.m when I have started an octplot
session using octplot_enable. On subsequent calls to the
plot.m, there is no reported error.

Even if I use another plotting function first (such
as contour.m), the first call to plot.m spins up the error,
subsequent ones do not.

<file: line_example.m >
xs = [ 1 : 11 ] ;
ys = xs ;
plot( xs, ys, "-" ) ;
</file>

<stdout>
warning: in /usr/lib/octave/2.1.73/site/octplot-0.4.0/__nxtplt__.m
near line 22, column 1:
warning: function name `get' does not agree with function file name
`/usr/lib/octave/2.1.73/site/octplot-0.4.0/oget.m'
</stdout>

A minor fact that's probably unimportant: the __nxtplt__.m
and oget.m codes are installed to

C:/cygwin/lib/octave/2.1.73/site/octplot-0.4.0

on my machine, and do not appear in

C:/cygwin/usr/lib/octave/2.1.73/site/octplot-0.4.0

If anyone other than me can reproduce this behavior, then
I guess that we have a bug. Otherwise, it should be considered
a minor annoyance, since it does not crash octplot.

Thanks,

George
gbarrick@kent.edu

Discussion

  • Shai Ayal

    Shai Ayal - 2007-04-22

    Logged In: YES
    user_id=136223
    Originator: NO

    George,

    This is actually a problem with get, not with __nxtplt__. In any case it is harmless adn you can ignore it. I will try to make it go away

    Shai

     
  • Shai Ayal

    Shai Ayal - 2007-04-22
    • priority: 5 --> 2
     
  • Nobody/Anonymous

    Logged In: NO

    This is due to the following line in the get function:
    get(0,'children')

    It will appear once only during the first time of calling "get(0,'children')"

    But, why does it only happen to this version of octplot 0.4.0 but not appear in previous version 0.3.9?

     
  • Nobody/Anonymous

    Logged In: NO

    Moreover, Why do we need the "oget.m" to link to the "get.m"?

     
  • Shai Ayal

    Shai Ayal - 2007-05-23

    Logged In: YES
    user_id=136223
    Originator: NO

    To answer your questions:
    1) octplot 0.4.0 will work with octave 2.9.10 which introduced a built-in get function (octave now supports handle graphics with a gnuplot backend). This means octplot has to supply it's own version of get to override the built-in using dispatch
    2) The oget/get duo is so that
    a. we need oget so that we can write dispatch("get","oget","any");
    b. we need the function to be called get so that help get will work

    If you have any other idea on how to implement 2a & 2b, please post it -- I am annoyed by this warning also.

    Shai

     
  • Nobody/Anonymous

    Logged In: NO

    However, the following message appears due to the difference of 2 function names "get" and oget".

    <stdout>
    warning: function name `get' does not agree with function file name `/usr/lib/octave/2.1.73/site/octplot-0.4.0/oget.m'
    </stdout>

    Note: octplot use the "ln" command to link "oget.m" to "get.m".

    ----------------------------------------------------
    cd /usr/lib/octave/2.1.73/site/octplot-0.4.0 && \ ln -s -f set.m oset.m && \ ln -s -f get.m oget.m
    ----------------------------------------------------

    When the "oget.m" function is called, it will link to "get.m" and run the "get.m" which has the prototype "function _out = get (varargin)" but not "function _out = oget (varargin)".

    A silly solution to the problem

    One silly method to make the alloying message disappear is:
    1. to delete the link of "oget.m" and
    2. copy the "get.m" to "oget.m" and
    3. rename the function name "oget.m" to "function _out = oget (varargin)"
    Then, the annoying message will disappear.
    However, it will be a little bit redundant to have 2 functions with same script but having different name.

    Further suggestion

    In order to solve the problem completely:
    Instead of use the link "ln -s -f get.m oget.m", someone may write a function "oget.m" to call the octplot function "get.m" indirectly.

     
  • Shai Ayal

    Shai Ayal - 2007-05-28

    Logged In: YES
    user_id=136223
    Originator: NO

    I'm not sure this solution will work -- the whole point is to override the builtin get function (available from octave 2.9.10).

    let me explain wht there is oget & get:

    The only need for oget is so that
    dispatch("get","oget","any")
    will cause oget to be called instead of get.

    So far, it looks like this would be enough. But if there is no get.m in the current path, the command
    help get
    whould not work. My solution was to symlink get.m to oget.m
    This now causes the warning message.
    If you have a solution, a patch would be welcome

    Shai

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.