Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions eplot
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# **************************************************************************
# Changelog:
# 2.11 06.08.2020: -Charles Franklin added --notitle option (@cjfman)
# 2.10 05.08.2020: -Bugfix: print --help output to stdout instead of stderr
# 2.09 03.09.2018: -Jon Coppeard added support for SVG (@jonco3 at github)
# 2.08 24.07.2017: -added dumb terminal support by Peter Barnes
# 2.07 03.05.2007: -bugfix case where input file is empty
Expand Down Expand Up @@ -57,7 +59,7 @@ require 'tempfile'
# **************************************************************************
# CONFIGURATION

$Version="2.07 03.05.2007"
$Version="2.11 06.08.2020"
$TextViewer="cat"
$GnuPlot4OrNewer=true

Expand Down Expand Up @@ -100,6 +102,7 @@ Output formatting options:
-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")
--notitle suppress the default title

Miscellaneous opions:
-B <pos>,<height> creates vertical bars (separated by @)
Expand Down Expand Up @@ -132,6 +135,7 @@ class OptionController
@o["MulFrMul"]=false
@o["MulFrSin"]=false
@o["MulFrSeq"]=false
@o["NoTitle"]=false
@o["DumpFiles"]=false
@o["TitleString"]=""
@o["Bars"]=""
Expand Down Expand Up @@ -191,6 +195,10 @@ class OptionController
when /^-d$|^--dumb$/
com=com+"set terminal dumb;\n"

# ---- Do we suppress the title?
when /^--notitle$/
@o["NoTitle"]=true

# ---- Multiple curves in a single diagram from different files
when /^-m$|^--mulfrmul$/
@o["MulFrMul"]=true
Expand Down Expand Up @@ -437,7 +445,11 @@ class Controller
def runSinFrSin(filename)
styleArr=@oc["StyleIndices"].split(",")
com="\""+filename+"\" "
com=com+"title \""+@oc["TitleString"]+"\" " if @oc["TitleString"]!=""
if @oc["TitleString"]!=""
com=com+"title \""+@oc["TitleString"]+"\" "
elsif @oc["NoTitle"]
com=com+"notitle "
end
com=com+"with "+@oc["LineType"]+" ls "+styleArr[0]
plot(com,false)
end
Expand Down Expand Up @@ -574,6 +586,7 @@ class Controller
t=File.open(fn)
openedFiles.push(t)
end
removeDummyTitles(openedFiles.length) if @oc["NoTitle"]
runMulFrMulOpenedFiles(openedFiles)
openedFiles.each { |f| f.close }
end
Expand Down