bugGNU Octave - Bugs: bug #60354, Permanent switching of gnuplot...


bug #60354: Permanent switching of gnuplot terminals & executables

Submitted by:  None
Submitted on:  Wed 07 Apr 2021 01:20:40 PM UTC  
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Wont Fix Assigned to:  None
Originator Name:  Michael Erhard Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  6.2.0
Operating 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)

Thu 08 Apr 2021 02:44:08 PM UTC, comment #8: 

With the warning added, I'm now closing this report.  Octave Maintainer's can't fix the underlying issues such as the fact that gnuplot relies on a one-way pipe for communication.

Rik <rik5>
Project Administrator
Thu 08 Apr 2021 05:53:26 AM UTC, comment #7: 

Thanks, I didn't know, that gnuplot is no longer one of the prefered toolkits.
I previous releases, gnuplot was the only possibility of making&saving high quality images, because in qt antialiasing doesn't work properly and noisy data wasn't plottable.
In 6.2.0 it is really good now, so there is maybe no need for further improvements of interaction with gnuplot.

Thu 08 Apr 2021 04:35:28 AM UTC, comment #6: 

I pushed the following changeset on stable and merged with default.


John W. Eaton <jwe>
Project Administrator
Wed 07 Apr 2021 10:54:51 PM UTC, comment #5: 

I think jwe's suggestion of a warning would be a good thing.  gnuplot just isn't a focus of development, and hasn't been for years.  Best to use Qt for plotting if at all possible.

Rik <rik5>
Project Administrator
Wed 07 Apr 2021 05:52:34 PM UTC, comment #4: 

I'm wondering whether we should issue a warning when switching to the gnuplot graphics toolkit.  We could give the warning an ID so it could be disabled.  The message could at least say that the interface to gnuplot is not actively maintained and possibly provide more info about known issues such as Octave not knowing when a plot window is closed interactively.

John W. Eaton <jwe>
Project Administrator
Wed 07 Apr 2021 03:29:48 PM UTC, comment #3: 


You shouldn't close the gnuplot window manually (using the mouse, key combinations, ...). Keep the handle to the figure around and close it with the `close` command instead. Octave gets "confused" if the other end of the one-way pipe suddenly disappears...
If you close the window manually, make sure to also close the handle in Octave. Or open a new figure handle to plot to.

If you have an idea how that could work better, patches are welcome (but keep in mind that the "gnuplot" graphics toolkit is no longer worked on actively).

Also proposals to improve the documentation are welcome.

Markus Mützel <mmuetzel>
Project Member
Wed 07 Apr 2021 03:18:56 PM UTC, comment #2: 

Thanks for your reply, I understand what you mean.

Nevertheless, I'm wondering that after interaction with the plot window (e.g. closing with the mouse) and repeating the same commands, gnuplot does other things.
Therefore I've attached a screenshot with the entries from the command window. Between some plot commands, I sometimes close the old plot window with the mouse. Afterwards, three different calls of plot open three different plot windows with different styles.

Wed 07 Apr 2021 01:36:13 PM UTC, comment #1: 

IIUC, you are describing known behavior.

See section "15.1 Introduction to Plotting" in the manual:

> Note: The gnuplot graphics toolkit uses the third party program gnuplot for plotting. The communication from Octave to gnuplot is done via a one-way pipe. This has implications for performance and functionality. Performance is significantly slower because the entire data set, which could be many megabytes, must be passed to gnuplot over the pipe. Functionality is negatively affected because the pipe is one-way from Octave to gnuplot. Octave has no way of knowing about user interactions with the plot window (be it resizing, moving, closing, or anything else). It is recommended not to interact with (or close) a gnuplot window if you will access the figure from Octave later on.

I don't know whether there is an open report about this already. In any case, I don't know if it makes sense to keep a report open because there is little we can do to change this.

Markus Mützel <mmuetzel>
Project Member
Wed 07 Apr 2021 01:20:40 PM UTC, original submission:  

I've seen some problems regarding the gnuplot toolkit. The overall behaviour seems very ambiguous.

Here an example:
1) Set graphics toolkit to "gnuplot"


2) Using simple plot commands, either...




everything works fine, the xwt terminal is used and windows shows gnuplot.exe as executable. As long as the first figure or any subsequent figures remain open, the terminal and the executable is unchanged.
3) Closing all opened figure windows (mouse or command) an re-open a figure switches the terminal and the executable.

close all

The figure command opens a figure in the wxt terminal, but the plot command doesn't plot in this figure, now the gnuplot-qt.exe is opened and the plot appears in another terminal window.

Other combinations are possible, I get up to three different terminals only using the commands figure-plot-close in different order.



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

Attach Files:

Attached Files
file #51206:  gnuplot.png added by None (217KiB - image/png)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)

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

    Only project members can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-04-08 rik5 StatusNone => Wont Fix
        Open/ClosedOpen => Closed
    2021-04-07 None Attached File- => Added gnuplot.png, #51206

    Back to the top

    Powered by Savane 3.6