Mercurial > hg > octave-terminal
changeset 11753:5cedea7a0fdd release-3-0-x
Display a (hopefully) informative error message if gnuplot isn't found
author | sh@sh-laptop |
---|---|
date | Wed, 16 Apr 2008 14:19:59 -0400 |
parents | ee21531f1b5e |
children | a7a4090cf532 |
files | scripts/ChangeLog scripts/plot/__gnuplot_version__.m |
diffstat | 2 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2008-04-16 Soren Hauberg <hauberg@gmail.com> + + * plot/__gnuplot_version__.m: Display error if gnuplot is not found. + 2008-04-15 John W. Eaton <jwe@octave.org> * plot/view.m: Get values from current axes if nargin == 0.
--- a/scripts/plot/__gnuplot_version__.m +++ b/scripts/plot/__gnuplot_version__.m @@ -28,6 +28,9 @@ if (isempty (__version__)) [status, output] = system (sprintf ("%s --version", gnuplot_binary ())); + if (status != 0) + error ("you must have gnuplot installed to display graphics; if you have gnuplot installed in a non-standard location, see the 'gnuplot_binary' function"); + endif 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}))