octave does not plot anything

Bug #1428196 reported by Juergen Hench on 2015-03-04

This bug report was converted into a question: question #263267: octave does not plot anything.

This bug affects 1 person
Affects Status Importance Assigned to Milestone
octave (Ubuntu)

Bug Description

GNU Octave, version 3.8.1, Ubuntu 14.04
gnuplot (Version 4.6 patchlevel 4, last modified 2013-10-02, Build System: Linux x86_64)
OS: Ubuntu 14.04.1 LTS, Release: 14.04

octave: Installed: 3.8.1-1ubuntu1
gnuplot: Installed: 4.6.4-2

sample output:

octave:1> plot(rand(10))
libGL error: failed to load driver: swrast

I am running octave on a vnc4server headless system (a data processing server, AMD 64-bit CPU) with a freshly installed system. I am using the XFCE4 desktop environment launched vnc4server. Whenever I try to create a plot (or directly write the plot data into files with the print() function) I am getting this error message. I can, however, run gnuplot alone, I can see the plot window and I can generate plots.

Octave 3.8 also "prints" the plot to a graphics file, e.g. in SVG format. But this file is completely white. Likewise, the plot window is displayed, but it remains white.

I have just migrated from an ubuntu 12.04 platform to 14.04, and have kept the "old" computer (same type, 64-bit CPU). There, octave 3.2 produces the expected plots.

1) Is there another way to generate plots in octave into files (e.g. svg) that are not affected by this (seemingly graphics driver) problem?

2) How could this be fixed for headless systems running a vnc server without using the physical graphics card output?

Did anyone else notice this?

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: octave 3.8.1-1ubuntu1
ProcVersionSignature: Ubuntu 3.13.0-45.74-generic 3.13.11-ckt13
Uname: Linux 3.13.0-45-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.6
Architecture: amd64
CurrentDesktop: XFCE
Date: Wed Mar 4 16:55:47 2015
InstallationDate: Installed on 2009-03-11 (2184 days ago)
InstallationMedia: Xubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140416.2)
SourcePackage: octave
UpgradeStatus: No upgrade log present (probably fresh install)

Juergen Hench (jurgen-hench) wrote :
Juergen Hench (jurgen-hench) wrote :

Boiled it down to octave. Solution is here:


Use the command:
   graphics_toolkit ("gnuplot")
at the beginning of your octave scripts or in your private .octaverc file

user@mycomputer:~$ nano .octaverc

paste graphics_toolkit ("gnuplot")

save file (crtl-o)

done. Test by running plot(rand(3)). You will see the usual output and the print function will work again.

Mike Miller (mtmiller) wrote :

Thank you for taking the time to report this issue and helping to make Ubuntu better. Since your report reads more like a support question, and since you have come up with a working solution, I am converting this into a question. Feel free to post your solution as an answer to the question and mark it as solved.

Changed in octave (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions