Skip to content

Commit 5106b6d

Browse files
Added patch by Peter Barnes (dumb terminal support)
1 parent 39c4e93 commit 5106b6d

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

eplot

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2525
# **************************************************************************
2626
# Changelog:
27+
# 2.08 24.07.2017: -added dumb terminal support by Peter Barnes
2728
# 2.07 03.05.2007: -bugfix case where input file is empty
2829
# 2.06 09.12.2005: -bugfix style not set when single plot from stdin
2930
# 2.05 19.11.2005: -no dummy titles are displayed (tmp files etc.); bugfixes
@@ -81,6 +82,7 @@ Output file format options:
8182
-a --pdf Output to the pdf file foo.pdf
8283
-e --emf Output to the emf file foo.emf
8384
-o <fname> Specify the output filename
85+
-d --dumb Output to dumb terminal (ascii art)
8486
8587
Output formatting options:
8688
-r <ranges> set the range of x and y axis values
@@ -90,7 +92,9 @@ Output formatting options:
9092
-l <type> set the type of curve (lines,points,linespoints,...)
9193
-w <width> set the line width (default: 1)
9294
-x <x-axis-opt> provide x-axis options
95+
--xlog log x-axis
9396
-y <y-axis-opt> provide y-axis options
97+
--ylog log y-axis
9498
-t <titles> set the title(s) of the curve(s) (separated by @)
9599
-I <indices> set the order of the line styles (separated by ,)
96100
(e.g. -I "2,1,3,4,5")
@@ -176,7 +180,11 @@ class OptionController
176180
when /^-o$|^--output$/
177181
@o["OutputFileSpecified"]=checkOptArg(xargv,i)
178182
i=i+1
179-
183+
184+
# ---- Do we print to dumb terminal?
185+
when /^-d$|^--dumb$/
186+
com=com+"set terminal dumb;\n"
187+
180188
# ---- Multiple curves in a single diagram from different files
181189
when /^-m$|^--mulfrmul$/
182190
@o["MulFrMul"]=true
@@ -228,8 +236,16 @@ class OptionController
228236
when /^-x$|^--xlabel$/
229237
com=com+"set xlabel \""+checkOptArg(xargv,i)+"\";\n"
230238
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
233249
when /^-y$|^--ylabel$/
234250
com=com+"set ylabel \""+checkOptArg(xargv,i)+"\";\n"
235251
i=i+1
@@ -377,7 +393,7 @@ class Controller
377393
# ---- print the options
378394
com="echo '\n"+getStyleString+@oc["MiscOptions"]
379395
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"
381397
printAndRun(com)
382398
# ---- convert to PDF
383399
if @oc["DoPDF"]

0 commit comments

Comments
 (0)