Results 1 to 4 of 4

Thread: Octave won't plot

  1. #1
    Join Date
    Apr 2009
    Beans
    11

    Octave won't plot

    Hi everyone. I just decided to have a clean install of Ubuntu 9.0.4 on my laptop.

    i installed octave 3.0.1 from synaptic, which brought gnuplot among other dependencies. Everything installed just fine, but Octave won't plot.

    A simple command such as:

    Code:
    octave:1> x=[0:0.1:1];
    octave:2> plot(x,x,";something;");
    will produce the given output:

    Code:
    error: `have_newer_gnuplot' undefined near line 1589 column 7
    error: if: error evaluating conditional expression
    error: evaluating if command near line 1589, column 3
    error: called from `__go_draw_axes__:get_text_colorspec' in file `/usr/share/octave/3.0.1/m/plot/__go_draw_axes__.m'
    error: evaluating assignment expression near line 90, column 17
    error: evaluating if command near line 87, column 5
    error: evaluating if command near line 25, column 3
    error: called from `__go_draw_axes__' in file `/usr/share/octave/3.0.1/m/plot/__go_draw_axes__.m'
    error: evaluating switch command near line 58, column 4
    error: evaluating for command near line 56, column 2
    error: evaluating if command near line 33, column 7
    error: evaluating if command near line 26, column 5
    error: evaluating if command near line 25, column 3
    error: called from `__go_draw_figure__' in file `/usr/share/octave/3.0.1/m/plot/__go_draw_figure__.m'
    error: evaluating if command near line 81, column 6
    error: evaluating if command near line 78, column 4
    error: evaluating if command near line 76, column 2
    error: evaluating for command near line 75, column 7
    error: evaluating if command near line 45, column 5
    error: called from `drawnow' in file `/usr/share/octave/3.0.1/m/plot/drawnow.m'
    any idea?

    thanks in advance!

  2. #2
    Join Date
    Aug 2005
    Location
    Fargo, ND, USA
    Beans
    1,499
    Distro
    Kubuntu 10.04 Lucid Lynx

    Re: Octave won't plot

    That variable is defined right in /usr/share/octave/3.0.1/m/plot/__go_draw_axes__.m. Does your __go_draw_axes__.m have the following declaration?

    Code:
        persistent have_newer_gnuplot ...
          = compare_versions (__gnuplot_version__ (), "4.0", ">");
    Also, be sure that you have the gnuplot-x11 package installed.
    Code:
    dpkg -l gnuplot-x11
    Code:
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
    ||/ Name           Version        Description
    +++-==============-==============-============================================
    ii  gnuplot-x11    4.2.4-6        A command-line driven interactive plotting p
    Help yourself: Search the community docs or try other resources.
    Quote Originally Posted by Henry Spencer
    Those who do not understand Unix are condemned to reinvent it, poorly.
    Let science use your computer when you aren't: Folding@Home.

  3. #3
    Join Date
    Apr 2009
    Beans
    11

    Re: Octave won't plot

    I have this in /usr/share/octave/3.0.1/m/plot/__go_draw_axes__.m

    Code:
        persistent have_newer_gnuplot ...
          = compare_versions (__gnuplot_version__ (), "4.0", ">");
    As for gnuplot-x11, it' is installed, a different version from yours, but installed.

    Code:
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
    ||/ Name           Version        Description
    +++-==============-==============-============================================
    ii  gnuplot-x11    4.2.3-1        X11-terminal driver for gnuplot

  4. #4
    Join Date
    Aug 2005
    Location
    Fargo, ND, USA
    Beans
    1,499
    Distro
    Kubuntu 10.04 Lucid Lynx

    Re: Octave won't plot

    Quote Originally Posted by Johnco View Post
    I have this in /usr/share/octave/3.0.1/m/plot/__go_draw_axes__.m

    Code:
        persistent have_newer_gnuplot ...
          = compare_versions (__gnuplot_version__ (), "4.0", ">");
    After I made my post, I looked more carefully at the file, and the declaration appears in several functions. Make sure it's in the function where the error occurs (forunately there's a line number in the error).

    My bet is that it is there, which makes the error message very strange.

    Probably the best thing to do is ask the octave mailing list. In the meantime, I would try hard coding it in there without the "persistent", e.g.
    Code:
    have_newer_gnuplot = 1
    Quote Originally Posted by Johnco View Post
    As for gnuplot-x11, it' is installed, a different version from yours, but installed.
    I forgot that I installed a newer version to fix mouse zooming. But I have machines with the Ubuntu version installed and they work fine.
    Help yourself: Search the community docs or try other resources.
    Quote Originally Posted by Henry Spencer
    Those who do not understand Unix are condemned to reinvent it, poorly.
    Let science use your computer when you aren't: Folding@Home.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •