[Top][All Lists]

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

Re: Calling plot() consistently crashes octave - Why?

From: Mike Miller
Subject: Re: Calling plot() consistently crashes octave - Why?
Date: Fri, 21 Jul 2017 14:32:09 -0700
User-agent: NeoMutt/20170609 (1.8.3)

On Fri, Jul 21, 2017 at 11:09:17 -0700, david wrote:
> Now I just installed octave onto a newly released (Jun 10, 2017)Debian linux
> distro.
> $ uname -a
> Linux neptune 4.9.30 #6 SMP PREEMPT Sun May 28 18:35:23 CEST 2017 x86_64
> GNU/Linux
> Am running GNU Octave, version 3.8.2 in a bash shell, on a 64-bit quad-core
> CPU.   That's the version which #apt-get install octave installed.

As a first step, you might want to check which version of Debian you
actually have installed and make sure your apt sources are up to date.

Debian 9 (stretch), which was released on June 17, includes Octave
4.0.2. And with the backports repository enabled, Octave 4.2.1.

> I also installed gnuplot using #apt-get install gnuplot because I thought
> that if plot doesn't work in octave, maybe I could use gnuplot as a separate
> program to plot data saved to a file.

Yes, but Octave also uses gnuplot as a fallback plotting backend if your
system lacks in OpenGL support or is headless. For the best experience,
you might want to make sure that the gnuplot-qt package is installed.

> $ octave
> GNU Octave, version 3.8.2
> Copyright (C) 2014 John W. Eaton and others.
> This is free software; see the source code for copying conditions.
> FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.
> Octave was configured for "x86_64-pc-linux-gnu".
> Additional information about Octave is available at
> Please contribute if you find this software useful.
> For more information, visit
> Read to learn how to submit bug reports.
> For information about changes from previous versions, type 'news'.
> octave:1> graphics_toolkit
> ans = gnuplot

Do you have a ~/.octaverc? Are you explicitly choosing to make gnuplot
the default graphics_toolkit?

> octave:4> pkg list
> Package Name  | Version | Installation directory
> --------------+---------+-----------------------
>      gnuplot  |   1.0.1 | /home/george/octave/gnuplot-1.0.1
>         plot *|   1.1.0 | /usr/share/octave/packages/plot-1.1.0

Both of these packages are obsolete, you do not need to install them at
all. Octave has built in support for plotting with OpenGL and gnuplot. I
recommend that you do

    rm -rf ~/octave/gnuplot-1.0.1
    sudo apt-get purge octave-plot
    octave --eval 'pkg rebuild'

> Every time I call plot() from octave, octave crashes with the same
> error message:
[copied text from nabble]
>     octave:1> graphics_toolkit("gnuplot")
>     octave:2> x=-10:0.1:10;
>     octave:3> graphics_toolkit
>     ans = gnuplot
>     octave:4> plot(x,sin(x));
>     panic: Illegal instruction -- stopping myself...
>     Illegal instruction

You might want to try separating the plot from the sin function to see
which is to blame. You should also try this after sorting out your apt
sources and making sure the obsolete packages are no longer installed.


reply via email to

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