help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnuplot_x11 driver with octave.app/gnuplot.app on Mac


From: Thomas Treichl
Subject: Re: gnuplot_x11 driver with octave.app/gnuplot.app on Mac
Date: Fri, 10 Aug 2007 17:33:57 +0200
User-agent: Thunderbird 2.0.0.6 (Macintosh/20070728)

Thomas Treichl schrieb:
John W. Eaton schrieb:
On  4-Aug-2007, Thomas Treichl wrote:

| also drawnow.m overwrites the term variable to "aqua" - a first workaround would | be that you manually set "x11" in line 124 of | <Octave.app>/Contents/Resources/share/octave/2.9.13/m/plot/drawnow.m | | term = "x11"; | | Don't know if I have the time today to work on this problem but meanwhile you | should be able to work with this and X11. I prepare a patch and then send this | to the list.

The following patch to drawnow.m has already been made in the Octave
CVS.  Does it fix the problem for you?

jwe

Right John, it fixes the first problem. So the second problem in __gnuplot_version__.m could be solved in a way like this (cf. line 33)

   pattern = "gnuplot\\s*([0-9]+\\.[0-9]+)\\s*[^\\s]*\\s*([^\\s]*)";


I could fix the strange '/Applications/GnuPlot.app/Contents/Resources/lib:' output of gnuplot's version number on the Gnuplot.app side of OS X. Nevertheless, my suggestion is the attached patch for __gnuplot_version__.m where iscellstr inherits iscell (from my point of view) and if something goes wrong then print an error...

  Thomas
--- scripts/plot/__gnuplot_version__.m.~1.4.~   2007-08-10 17:27:04.000000000 
+0200
+++ scripts/plot/__gnuplot_version__.m  2007-08-10 17:27:58.000000000 +0200
@@ -32,8 +32,10 @@
     [status, output] = system (sprintf ("%s --version", gnuplot_binary ()));
     pattern = "^[^\\s]*\\s*([0-9]+\\.[0-9]+)\\s*[^\\s]*\\s*([^\\s]*)";
     [d1, d2, d3, d4, matches] = regexp (output, pattern);
-    if (iscell (matches) && numel (matches) > 0 && iscellstr (matches{1}))
+    if (!isempty (matches) && numel (matches) > 0 && iscellstr (matches{1}))
       __version__ = matches{1}{1};
+    else 
+      error ("Gnuplot version number could not be determined");
     endif
   endif
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]