You are not logged in.

#1 2017-07-07 09:43:51

sitwano
Member
Registered: 2017-07-07
Posts: 83

Octave 4.2.1-5 plots result in a black window with plot controls

I've installed octave using

 sudo pacman -S octave

and also installed all the optional dependencies. However, when I try to plot something I always get a black window with plot controls. When I change the graphics toolkit to fltk or gnuplot, the plots work. For this i use the commands

graphics_toolkit("gnuplot")

or

graphics_toolkit("fltk")

To check my plots I just type into octave

 sombrero() 

But I would like to use the new qt plot window that comes with octave 4.0. I really want octave to work as it should. My final option if nothing works is to compile and build octave from source, but I'm reluctant to do that just yet.

Below is a screenshot of what I'm experiencing! (might have to right-click and open image in new tab). Thanks in advance for any assistance!

my_screenshot_octave

Edit: So an interesting thing happened. The plot shows up when I save the plot using file --> save as. However after saving and the plot showing up, none of the controls work!

Edit: So a temporary solution (which doesn't work 100% of the time) is to start octave in the terminal like this:

LIBGL_ALWAYS_SOFTWARE=1 octave

Another workaround is to download the latest octave sources and build octave by explicitly asking it to build with qt4 instead of qt5 like this:

../configure -with-qt=4

This pretty much solves the problem.

The bug has been acknowledged and is currently being investigated. It can be tracked at http://savannah.gnu.org/bugs/index.php?51442.

Last edited by sitwano (2017-07-13 07:52:26)

Offline

#2 2017-07-07 10:45:02

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,520
Website

Re: Octave 4.2.1-5 plots result in a black window with plot controls

Initially I wasn't able to replicate this, but then I tried the octave GUI (which I'd never used before).  While octave-cli works fine for me, the gui showed this problem for me too (and a couple others which seem to be due to octave's gui not playing well with a non-reparenting WM).  In my case the plot window was not black, but initially showed up with just borders.  Once I moved/resized it the plot window controls appeared, but the plot area just maintained a copy of whatever had been behind it.

Does plotting work for you in octave-cli?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2017-07-07 10:54:09

sitwano
Member
Registered: 2017-07-07
Posts: 83

Re: Octave 4.2.1-5 plots result in a black window with plot controls

yes, plotting in octave-cli works. However it seems to be using the old plotting interface. However plotting in octave or octave --no-gui  results in that black window. It's a shame really. I will try to see if logging in using Xorg helps, as it could be a wayland thing.

Here is the result of plotting sombrero() in octave-cli

sombrero_octave-cli

Thanks for the replies so far!

Edit: It appears that plotting in Xorg works as it should! However, I did need to resize the plot window the first time I plotted. Subsequent plots works fine after that. Should wayland compatibility be reported as a bug?

Here is what the plot should look like (plotted in xorg)

xorg_octave_plot_sombrero

Last edited by sitwano (2017-07-07 11:06:50)

Offline

#4 2017-07-07 14:45:52

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Octave 4.2.1-5 plots result in a black window with plot controls

Search upstream's bug tracker and check if someone reported the problem, if not you could submit a bug report. I suppose octave's devs don't mind to know about compatibility problems like this.

That said, over time I've found a few weird bugs, such as all black plots when saving as eps and plot legends with a lot of space between them if you increase the font size. To work around this I do all the processing in octave then save the data I want to plot and then plot it with gnuplot, which I believe octave can use directly but doesn't really work well. It's a bit of a kludge but gnuplot has not failed me yet when plotting to eps.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#5 2017-07-11 14:49:19

sitwano
Member
Registered: 2017-07-07
Posts: 83

Re: Octave 4.2.1-5 plots result in a black window with plot controls

Submitted a bug report to the octave bug reporting site.

http://savannah.gnu.org/bugs/index.php?51442 for tracking

Offline

Board footer

Powered by FluxBB