kostli
Posts: 9
Joined: Fri Oct 23, 2015 6:15 pm

Octave

Sat Nov 21, 2015 7:48 pm

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!!!

dr_d_gee
Posts: 84
Joined: Fri Jan 04, 2013 1:30 pm

Re: Octave

Sun Nov 22, 2015 7:12 pm

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.

User avatar
TideMan
Posts: 234
Joined: Fri Jun 22, 2012 8:08 am
Location: ChCh, NZ

Re: Octave

Sun Nov 22, 2015 10:03 pm

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')

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23874
Joined: Sat Jul 30, 2011 7:41 pm

Re: Octave

Mon Nov 23, 2015 9:11 am

I installed QTOctave, runs under LXDE and the plotting works out of the box.

Never tried Octave before - looks pretty good.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

User avatar
TideMan
Posts: 234
Joined: Fri Jun 22, 2012 8:08 am
Location: ChCh, NZ

Re: Octave

Mon Nov 23, 2015 7:09 pm

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.
If you wish in this world to advance, your merits you're bound to enhance.
You must stir it and stump it and blow your own trumpet, or trust me you haven't a chance.
Ruddigore, G&S

EricFlagstaffAZ
Posts: 4
Joined: Sun Nov 23, 2014 4:31 pm

Re: Octave

Thu Nov 10, 2016 4:15 pm

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

Return to “Other programming languages”