Page 1 of 1

Octave

Posted: Sat Nov 21, 2015 7:48 pm
by kostli
I have installed octave in raspberry pi and it can not saw plots.
I see below error:

Code: Select all

Insufficient GL support
Insufficient GL support
panic: Segmentation fault -- stopping myself...
attempting to save variables to 'octave-workspace'...
save to 'octave-workspace' complete
Segmentation fault
I am searching on the internet and I found the same problem and the reason which is happening but no solution!

Does anybody know any solution about above problem?

Thanks!!!

Re: Octave

Posted: Sun Nov 22, 2015 7:12 pm
by dr_d_gee
Octave can use several different graphics toolkits to do plotting. Try running this command:

Code: Select all

graphics_toolkit()
and see what result you get. You can change the graphics toolkit in use using the same function but passing the name of the toolkit to use as a string. I'd suggest 'gnuplot' might be the best option if it isn't the current toolkit (given the GL-related issues, I suspect 'qt' might be the current toolkit).

You will need to install gnuplot if it isn't already installed.

Re: Octave

Posted: Sun Nov 22, 2015 10:03 pm
by TideMan
Thank you dr_d_gee, this solved a problem I was having running Octave under Jessie with Remote Desktop Connection.
Turns out the default graphic toolkit is fltk which crashes Remote Desktop Connection when you try to execute anything graphical, even clf.

BTW, you can set gnuplot as default by creating a file .octaverc in /home/pi/ and inserting this line:

Code: Select all

graphics_toolkit('gnuplot')

Re: Octave

Posted: Mon Nov 23, 2015 9:11 am
by jamesh
I installed QTOctave, runs under LXDE and the plotting works out of the box.

Never tried Octave before - looks pretty good.

Re: Octave

Posted: Mon Nov 23, 2015 7:09 pm
by TideMan
jamesh wrote:
Never tried Octave before - looks pretty good.
As an old-time Matlab user (> 20 years), I find I can do everything in Octave that I previously did in Matlab.
And almost all my .m routines port across without any modifications.
There's also the price difference between $0 for Octave vs $5K or more for Matlab + annual maintenance.

Re: Octave

Posted: Thu Nov 10, 2016 4:15 pm
by EricFlagstaffAZ
Thanks TideMan!

I'm configured with a headless raspberry pi connected via X11. Adding the line: graphics_toolkit('gnuplot') to the rc file did the trick but one must first install the gnuplot package with the command: sudo apt-get install gnuplot-x11