changeset 29506:71b074e75198

maint: merge stable to default.
author John W. Eaton <jwe@octave.org>
date Thu, 08 Apr 2021 00:16:13 -0400
parents d57c1d781093 (current diff) a41c4b9ed648 (diff)
children 526a5ba817ca
files libinterp/dldfcn/__init_gnuplot__.cc
diffstat 1 files changed, 22 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/dldfcn/__init_gnuplot__.cc	Wed Apr 07 21:03:58 2021 +0200
+++ b/libinterp/dldfcn/__init_gnuplot__.cc	Thu Apr 08 00:16:13 2021 -0400
@@ -61,7 +61,28 @@
 {
 public:
   gnuplot_graphics_toolkit (octave::interpreter& interp)
-    : octave::base_graphics_toolkit ("gnuplot"), m_interpreter (interp) { }
+    : octave::base_graphics_toolkit ("gnuplot"), m_interpreter (interp)
+  {
+    static bool warned = false;
+
+    if (! warned)
+      {
+        warning_with_id
+          ("Octave:gnuplot-graphics",
+           "using the gnuplot graphics toolkit is discouraged\n\
+\n\
+The gnuplot graphics toolkit is not actively maintained and has a number\n\
+of limitations that are ulikely to be fixed.  Communication with gnuplot\n\
+uses a one-directional pipe and limited information is passed back to the\n\
+Octave interpreter so most changes made interactively in the plot window\n\
+will not be reflected in the graphics properties managed by Octave.  For\n\
+example, if the plot window is closed with a mouse click, Octave will not\n\
+be notified and will not update it's internal list of open figure windows.\n\
+We recommend using the qt toolkit instead.\n");
+
+          warned = true;
+      }
+  }
 
   ~gnuplot_graphics_toolkit (void) = default;