24
24
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
25
# **************************************************************************
26
26
# Changelog:
27
+ # 2.08 24.07.2017: -added dumb terminal support by Peter Barnes
27
28
# 2.07 03.05.2007: -bugfix case where input file is empty
28
29
# 2.06 09.12.2005: -bugfix style not set when single plot from stdin
29
30
# 2.05 19.11.2005: -no dummy titles are displayed (tmp files etc.); bugfixes
@@ -81,6 +82,7 @@ Output file format options:
81
82
-a --pdf Output to the pdf file foo.pdf
82
83
-e --emf Output to the emf file foo.emf
83
84
-o <fname> Specify the output filename
85
+ -d --dumb Output to dumb terminal (ascii art)
84
86
85
87
Output formatting options:
86
88
-r <ranges> set the range of x and y axis values
@@ -90,7 +92,9 @@ Output formatting options:
90
92
-l <type> set the type of curve (lines,points,linespoints,...)
91
93
-w <width> set the line width (default: 1)
92
94
-x <x-axis-opt> provide x-axis options
95
+ --xlog log x-axis
93
96
-y <y-axis-opt> provide y-axis options
97
+ --ylog log y-axis
94
98
-t <titles> set the title(s) of the curve(s) (separated by @)
95
99
-I <indices> set the order of the line styles (separated by ,)
96
100
(e.g. -I "2,1,3,4,5")
@@ -176,7 +180,11 @@ class OptionController
176
180
when /^-o$|^--output$/
177
181
@o [ "OutputFileSpecified" ] = checkOptArg ( xargv , i )
178
182
i = i +1
179
-
183
+
184
+ # ---- Do we print to dumb terminal?
185
+ when /^-d$|^--dumb$/
186
+ com = com +"set terminal dumb;\n "
187
+
180
188
# ---- Multiple curves in a single diagram from different files
181
189
when /^-m$|^--mulfrmul$/
182
190
@o [ "MulFrMul" ] = true
@@ -228,8 +236,16 @@ class OptionController
228
236
when /^-x$|^--xlabel$/
229
237
com = com +"set xlabel \" " +checkOptArg ( xargv , i ) +"\" ;\n "
230
238
i = i +1
231
-
232
- # ---- the y-axis label
239
+
240
+ # ---- log x-axis
241
+ when /^--xlog$/
242
+ com = com +"set logscale x;\n "
243
+
244
+ # ---- log y-axis
245
+ when /^--ylog$/
246
+ com = com +"set logscale y;\n "
247
+
248
+ # ---- the y-axis label
233
249
when /^-y$|^--ylabel$/
234
250
com = com +"set ylabel \" " +checkOptArg ( xargv , i ) +"\" ;\n "
235
251
i = i +1
@@ -377,7 +393,7 @@ class Controller
377
393
# ---- print the options
378
394
com = "echo '\n " +getStyleString +@oc [ "MiscOptions" ]
379
395
com = com +"set multiplot;\n " if doMultiPlot
380
- com = com +"plot " +@oc [ "Range" ] +comString +"\n '| gnuplot -persist"
396
+ com = com +"plot " +@oc [ "Range" ] +comString +"\n '| gnuplot -persist"
381
397
printAndRun ( com )
382
398
# ---- convert to PDF
383
399
if @oc [ "DoPDF" ]
0 commit comments