Mercurial > octave-nkf
comparison 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 |
comparison
equal
deleted
inserted
replaced
19866:a1acca0c2216 | 19867:9fc020886ae9 |
---|---|
207 size_str = sprintf ("size %.12g,%.12g", gnuplot_size); | 207 size_str = sprintf ("size %.12g,%.12g", gnuplot_size); |
208 case "tikz" | 208 case "tikz" |
209 size_str = sprintf ("size %gin,%gin", gnuplot_size); | 209 size_str = sprintf ("size %gin,%gin", gnuplot_size); |
210 case "dumb" | 210 case "dumb" |
211 new_stream = 1; | 211 new_stream = 1; |
212 if (!isempty (getenv ("COLUMNS")) && !isempty (getenv ("LINES"))) | 212 if (! isempty (getenv ("COLUMNS")) |
213 && ! isempty (getenv ("LINES"))) | |
213 ## Let dumb use full text screen size (minus prompt lines). | 214 ## Let dumb use full text screen size (minus prompt lines). |
214 n = sprintf ("%i", -2 - length (find (sprintf ("%s", PS1) == "\n"))); | 215 n = sprintf ("%i", |
216 -2 - length (find (sprintf ("%s", PS1) == "\n"))); | |
215 ## n = the number of times \n appears in PS1 | 217 ## n = the number of times \n appears in PS1 |
216 size_str = ["size " getenv("COLUMNS") "," getenv("LINES") n]; | 218 size_str = ["size " getenv("COLUMNS") "," getenv("LINES") n]; |
217 else | 219 else |
218 ## Use the gnuplot default. | 220 ## Use the gnuplot default. |
219 size_str = ""; | 221 size_str = ""; |
295 endif | 297 endif |
296 if (! __gnuplot_has_feature__ ("has_termoption_dashed")) | 298 if (! __gnuplot_has_feature__ ("has_termoption_dashed")) |
297 ## If "set termoption dashed" isn't available add "dashed" option | 299 ## If "set termoption dashed" isn't available add "dashed" option |
298 ## to the "set terminal ..." command, if it is supported. | 300 ## to the "set terminal ..." command, if it is supported. |
299 if (any (strcmp (term, {"aqua", "cgm", "eepic", "emf", "epslatex", ... | 301 if (any (strcmp (term, {"aqua", "cgm", "eepic", "emf", "epslatex", ... |
300 "fig", "pcl5", "mp", "next", "openstep", "pdf", ... | 302 "fig", "pcl5", "mp", "next", "openstep", ... |
301 "pdfcairo", "pngcairo", "postscript", ... | 303 "pdf", "pdfcairo", "pngcairo", "postscript", ... |
302 "pslatex", "pstext", "svg", "tgif", "x11"}))) | 304 "pslatex", "pstext", "svg", "tgif", "x11"}))) |
303 term_str = [term_str " dashed"]; | 305 term_str = [term_str " dashed"]; |
304 endif | 306 endif |
305 endif | 307 endif |
306 if (any (strcmp (term, {"aqua", "wxt"}))) | 308 if (any (strcmp (term, {"aqua", "wxt"}))) |