1
votes

I'm running default Gnuplot and octave from the Kubuntu Saucy (13.10) repositories, and when I try to plot from octave, I get no plot, just the Gnuplot boilerplate, and then I can enter Gnuplot commands, or quite with control-D. This is the output I get:

naught101@naught101-chronos:~$ octave
GNU Octave, version 3.6.4
Copyright (C) 2013 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
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 http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/get-involved.html

Read http://www.octave.org/bugs.html to learn how to submit bug reports.

For information about changes from previous versions, type `news'.

octave:1> plot([1,2,3])
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 14: reading configurations from ~/.fonts.conf is deprecated.

        G N U P L O T
        Version 4.6 patchlevel 3    last modified 2013-04-12 
        Build System: Linux x86_64

        Copyright (C) 1986-1993, 1998, 2004, 2007-2013
        Thomas Williams, Colin Kelley and many others

        gnuplot home:     http://www.gnuplot.info
        faq, bugs, etc:   type "help FAQ"
        immediate help:   type "help"  (plot window: hit 'h')

Terminal type set to 'wxt'

There is no plot, and also no error message, and I can enter gnuplot commands (e.g. plot sin(x)/x brings up a plot correctly). If I hit Ctrl-D, I get this:

error: compare_versions: version numbers must be a single row
error: called from:
error:   /usr/share/octave/3.6.4/m/miscellaneous/compare_versions.m at line 85, column 5
error:   /usr/share/octave/3.6.4/m/plot/private/__gnuplot_has_feature__.m at line 50, column 23
error:   /usr/share/octave/3.6.4/m/plot/__gnuplot_drawnow__.m at line 200, column 11
error:   /usr/share/octave/3.6.4/m/plot/__gnuplot_drawnow__.m at line 84, column 16
octave:2> 

I have tried

sudo aptitude purge liboctave1 octave octave-common octave-ga octave-plot gnuplot gnuplot-qt

and a re-install, that didn't help.

1
I don't know if it will help you but newer versions of Octave give access to OpenGL. I had tons of problems to make gnuplot working with Octave. if you call in an Octave console: graphics_toolkit ("fltk"); Octave will use FLTK/OpenGL... And no more prb with Gnuplot... - PierrOz
@PierrOz: If I do that on kubuntu, I get a segfault when I try to plot. Are there perhaps other packages I need to install to make it work? - naught101
sorry for the late answer. I don't know actually about other packages. For me it works fine on MAC OS X 10.7. When I google this issue, it looks like you're not the only one facing it but I haven't seen any fix yet - PierrOz
Eh, I'm an idiot. I had an old self-compiled gnuplot binary in my PATH... removed it and all is well. Thanks for trying @PierrOz. :( - naught101

1 Answers

0
votes

I had the same problem on windows. In compare_versions.m I looked at v1 and v2 and found that v1 was empty. v1 is actually generated by the command __gnuplot_version__ () in __gnuplot_has_feature__.m. In the function __gnuplot_version__ () which is located in __gnuplot_version__.m, the command line to get the version of gnuplot is :

[status, output] = system (sprintf ("\"%s\" --version", gnuplot_binary ()));

while on windows it should be :

[status, output] = system (sprintf ("\"%s\" show version", gnuplot_binary ()));

It seems to be better. I don't like to change the source code of octave, but in this case, it seems it is the only solution.