bugGNU Octave - Bugs: bug #51772, Errors when running...


bug #51772: Errors when running compare_plot_demos with gnuplot toolkit on Windows

Submitted by:  Avinoam Kalma <avinoam>
Submitted on:  Thu 17 Aug 2017 04:08:47 AM UTC  
Category: Plotting with gnuplotSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Regression
Status: NoneAssigned to: None
Originator Name: AvinoamOpen/Closed: Open
Release: devOperating System: Microsoft Windows

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Sat 19 Aug 2017 09:06:40 PM UTC, comment #6:

Yes, you are describing well the problem. Just a small correction: Octave does not hang. The next print command fails with the error message:

More interesting, I can't reproduce this problem on another Windows machine I have.

maybe more people can check if they can confirm this problem.

I am changing the status to "Need Info"

Avinoam Kalma <avinoam>
Project Member
Sat 19 Aug 2017 06:47:58 PM UTC, comment #5:

OK, so I understand a little more now. There an error message from gnuplot (line 0: warning:...) and an error message from ghostscript (GPL Ghostscript 9.16:...) which is expecting to find the file created by gnuplot but is missing because of the "plot area too small" issue. There is that.

Then there is a more pressing issue that the ghostscript failure to find a file is causing Octave to hang on your system. If Octave wouldn't hang, and instead just recognize a demo/test failure, it would be consistent with old behavior. (I still don't see how ghostscript is launched with the demo('axis') command.)

Could you recreate the bigger issue with a more simple command? For example, try something like

system('gv nonexistantfile.png');

Again, I'm not 100% sure I understand exactly what the manifestation is. I can reproduce the gnuplot error by adding a third line to the title in the axis.m file, but nothing hangs here.

Dan Sebald <sebald>
Fri 18 Aug 2017 05:01:43 AM UTC, comment #4:

The problem here is not this particular example,
but when there is a gnuplot error, it causes the next print to fail with the error

This is a regression bug, because in 4.2.1, the same example cause a gnuplot error, but without affecting the next print.

Avinoam Kalma <avinoam>
Project Member
Thu 17 Aug 2017 06:24:48 PM UTC, comment #3:

The line of script that generates the origin/size in _gnuplot_draw_axes_.m is the following:

My recollection is that the _actual_axis_position_ (h) was a bit tricky and did not always produce good results. When I find time, I will look into this more closely. I searched past email for reference though and found these:



Dan Sebald <sebald>
Thu 17 Aug 2017 05:04:59 PM UTC, comment #2:

The error messages are coming from gnuplot, not Octave.

Demos 5 and 6 work on my linux system, but it's clear what the problem is. It looks like your example is failing with the interactive terminal plot (prior to attempting a PNG file). Attached is the screenshot of my interactive terminal. Notice how small the plot region is because of how large of space is left in the margins. The resulting PNG looks similar.

I would guess on your system the margins are so big, relatively speaking, that there is few if any pixels left for the actual plot. gnuplot then gives the error message you see and must get in a bad state as far as some intermediate data file. The fact that gnuplot can't do follow-up plots after that condition may be a gnuplot bug which I will investigate.

The main issue with Octave, though, is that the demo 5 is using space much too big in the margins. I'm also attaching the gnuplot commands that Octave generates, i.e.,

and the size of the plot is set within with

So the Octave scripts for the gnuplot toolkit are choosing far too big margins for some reason.

(file #41556)

Dan Sebald <sebald>
Thu 17 Aug 2017 06:39:02 AM UTC, comment #1:

A simple example:

The result on Win-7 machine with dev version is:

This happens in dev version, but not in 4.2.1, so it is marked as regression

Avinoam Kalma <avinoam>
Project Member
Thu 17 Aug 2017 04:08:47 AM UTC, original submission:

When running compare_plot_demos from m/testfun/private
I get on some of the files, when using gnuplot toolkit, the error message

In this case the png file is not create, but err file is not created either.

Avinoam Kalma <avinoam>
Project Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by sebald (Updated the item)
  • -unavailable- added by avinoam (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 17 Aug 2017 05:04:59 PM UTCsebaldAttached File-=>Added axis_demo5_Screenshot_from_2017-08-17_11:49:18.png, #41556
    Thu 17 Aug 2017 06:40:04 AM UTCavinoamItem GroupUnexpected Error=>Regression

    Back to the top

    Powered by Savane 3.1-cleanup1