Error when running plot on Octave: Xlib extension GLX missing on display

Error when running plot on Octave: Xlib extension GLX missing on display

Last updated:

Octave may throw an error if you run commands such as plot without support for OpenGL in your graphics card.

x=(-1:0.1:1);
y=x.^2;
plot(x,y);

xlib extension glx missing on display Xlib Extension GLX mising on display 0.0

Solution 1

Use gnuplot instead of OpenGL for rendering graphics:

close all
graphics_toolkit gnuplot
x=(-1:0.1:1);
y=x.^2;
plot(x,y);

plot using gnuplot plot using gnuplot instead of opengl

optional

Add this command to ~/.octaverc so that it's always executed for all your scripts

Solution 2

The problem is that your graphics card driver doesn't support OpenGL.

You should either install OpenGL support if it exists or use another graphics driver.

Manually installed nvidia drivers are known to cause this error.