Added patch by Peter Barnes (dumb terminal support)

This commit is contained in:
Christian Wolf 2017-07-24 13:02:43 +02:00
parent 39c4e938e6
commit 5106b6d678

24
eplot
View File

@ -24,6 +24,7 @@
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# **************************************************************************
# Changelog:
# 2.08 24.07.2017: -added dumb terminal support by Peter Barnes
# 2.07 03.05.2007: -bugfix case where input file is empty
# 2.06 09.12.2005: -bugfix style not set when single plot from stdin
# 2.05 19.11.2005: -no dummy titles are displayed (tmp files etc.); bugfixes
@ -81,6 +82,7 @@ Output file format options:
-a --pdf Output to the pdf file foo.pdf
-e --emf Output to the emf file foo.emf
-o <fname> Specify the output filename
-d --dumb Output to dumb terminal (ascii art)
Output formatting options:
-r <ranges> set the range of x and y axis values
@ -90,7 +92,9 @@ Output formatting options:
-l <type> set the type of curve (lines,points,linespoints,...)
-w <width> set the line width (default: 1)
-x <x-axis-opt> provide x-axis options
--xlog log x-axis
-y <y-axis-opt> provide y-axis options
--ylog log y-axis
-t <titles> set the title(s) of the curve(s) (separated by @)
-I <indices> set the order of the line styles (separated by ,)
(e.g. -I "2,1,3,4,5")
@ -176,7 +180,11 @@ class OptionController
when /^-o$|^--output$/
@o["OutputFileSpecified"]=checkOptArg(xargv,i)
i=i+1
# ---- Do we print to dumb terminal?
when /^-d$|^--dumb$/
com=com+"set terminal dumb;\n"
# ---- Multiple curves in a single diagram from different files
when /^-m$|^--mulfrmul$/
@o["MulFrMul"]=true
@ -228,8 +236,16 @@ class OptionController
when /^-x$|^--xlabel$/
com=com+"set xlabel \""+checkOptArg(xargv,i)+"\";\n"
i=i+1
# ---- the y-axis label
# ---- log x-axis
when /^--xlog$/
com=com+"set logscale x;\n"
# ---- log y-axis
when /^--ylog$/
com=com+"set logscale y;\n"
# ---- the y-axis label
when /^-y$|^--ylabel$/
com=com+"set ylabel \""+checkOptArg(xargv,i)+"\";\n"
i=i+1
@ -377,7 +393,7 @@ class Controller
# ---- print the options
com="echo '\n"+getStyleString+@oc["MiscOptions"]
com=com+"set multiplot;\n" if doMultiPlot
com=com+"plot "+@oc["Range"]+comString+"\n'| gnuplot -persist"
com=com+"plot "+@oc["Range"]+comString+"\n'| gnuplot -persist"
printAndRun(com)
# ---- convert to PDF
if @oc["DoPDF"]