diff scripts/plot/util/__gnuplot_drawnow__.m @ 19867:9fc020886ae9

maint: Clean up m-files to follow Octave coding conventions. Try to trim long lines to < 80 chars. Use '##' for single line comments. Use '(...)' around tests for if/elseif/switch/while. Abut cell indexing operator '{' next to variable. Abut array indexing operator '(' next to variable. Use space between negation operator '!' and following expression. Use two newlines between endfunction and start of %!test or %!demo code. Remove unnecessary parens grouping between short-circuit operators. Remove stray extra spaces (typos) between variables and assignment operators. Remove stray extra spaces from ends of lines.
author Rik <rik@octave.org>
date Mon, 23 Feb 2015 14:54:39 -0800
parents 4197fc428c7d
children 83792dd9bcc1 af5591ef9790
line wrap: on
line diff
--- a/scripts/plot/util/__gnuplot_drawnow__.m	Mon Feb 23 16:42:25 2015 +0000
+++ b/scripts/plot/util/__gnuplot_drawnow__.m	Mon Feb 23 14:54:39 2015 -0800
@@ -209,9 +209,11 @@
               size_str = sprintf ("size %gin,%gin", gnuplot_size);
             case "dumb"
               new_stream = 1;
-              if (!isempty (getenv ("COLUMNS")) && !isempty (getenv ("LINES")))
+              if (! isempty (getenv ("COLUMNS"))
+                  && ! isempty (getenv ("LINES")))
                 ## Let dumb use full text screen size (minus prompt lines).
-                n = sprintf ("%i", -2 - length (find (sprintf ("%s", PS1) == "\n")));
+                n = sprintf ("%i",
+                             -2 - length (find (sprintf ("%s", PS1) == "\n")));
                 ## n = the number of times \n appears in PS1
                 size_str = ["size " getenv("COLUMNS") "," getenv("LINES") n];
               else
@@ -297,8 +299,8 @@
       ## If "set termoption dashed" isn't available add "dashed" option
       ## to the "set terminal ..." command, if it is supported.
       if (any (strcmp (term, {"aqua", "cgm", "eepic", "emf", "epslatex", ...
-                              "fig", "pcl5", "mp", "next", "openstep", "pdf", ...
-                              "pdfcairo", "pngcairo", "postscript", ...
+                              "fig", "pcl5", "mp", "next", "openstep", ...
+                              "pdf", "pdfcairo", "pngcairo", "postscript", ...
                               "pslatex", "pstext", "svg", "tgif", "x11"})))
         term_str = [term_str " dashed"];
       endif