Browse Source

Filenames for gnuplot via env-vars

To not have hardcoded filenames in gnuplot script

https://wiki.ubuntuusers.de/Gnuplot/#Stapelverarbeitung-Zugriff-auf-Umgebungsvariablen
develop
Jonathan Golder 3 years ago
parent
commit
985e7a938e
2 changed files with 12 additions and 8 deletions
  1. +6
    -4
      gnuplot_scripts/Euro_exchange_rate_to_TRY_-_Turkish_Currency_and_Debt_Crisis_2018.plt
  2. +6
    -4
      gnuplot_scripts/TRY_exchange_rate_to_EUR_-_Turkish_Currency_and_Debt_Crisis_2018.plt

+ 6
- 4
gnuplot_scripts/Euro_exchange_rate_to_TRY_-_Turkish_Currency_and_Debt_Crisis_2018.plt View File

@ -3,9 +3,11 @@
# gnuplot script for plotting eurofxref-hist.csv as obtained from
# http://www.ecb.int/stats/exchange/eurofxref/html/index.en.html
infile=system("echo $INFILE")
outfile=system("echo $OUTFILE")
# Start und Ende ermitteln (z.Zt. nur für Consolenausagabe)
stats 'eurofxref-hist.csv' every ::1 u (strptime("%Y-%m-%d",strcol(1))) nooutput
stats infile every ::1 u (strptime("%Y-%m-%d",strcol(1))) nooutput
print ' -----Stats-(Timestamp)----'
print ' Start: ', strftime("%d. %B %Y",STATS_min)
print ' Ende: ', strftime("%d. %B %Y",STATS_max)
@ -68,7 +70,7 @@ do for [i=1:12:2] {
## gnuplot for SVG - gnuplot 4.2 / Ubuntu 8.10
set term svg size 800,400 font "Arial,16"
set outp 'Euro exchange rate to TRY - Turkish Currency and Debt Crisis 2018.svg'
set outp outfile
set style line 1 lt rgb 'blue' lw 1
#available currencies:
@ -76,7 +78,7 @@ set style line 1 lt rgb 'blue' lw 1
#USD,JPY,BGN,CYP,CZK,DKK,EEK,GBP,HUF,LTL,LVL,MTL,PLN,ROL,RON,SEK,SIT,SKK,CHF,ISK,NOK,HRK,RUB,TRL,TRY,AUD,BRL,CAD,CNY,HKD,IDR,ILS,INR,KRW,MXN,MYR,NZD,PHP,SGD,THB,ZAR
plot \
'eurofxref-hist.csv' \
infile \
usi 1:($26) axis x1y1 tit '1 EUR in TRY' lt rgb 'blue' lw 1,\
'eurofxref-hist.csv' \
infile \
usi 1:($26) axis x1y1 notit w p lc rgb 'black' lt 1 lw 1.5 pt 7 ps 0.1 \

+ 6
- 4
gnuplot_scripts/TRY_exchange_rate_to_EUR_-_Turkish_Currency_and_Debt_Crisis_2018.plt View File

@ -3,9 +3,11 @@
# gnuplot script for plotting eurofxref-hist.csv as obtained from
# http://www.ecb.int/stats/exchange/eurofxref/html/index.en.html
infile=system("echo $INFILE")
outfile=system("echo $OUTFILE")
# Start und Ende ermitteln (z.Zt. nur für Consolenausagabe)
stats 'eurofxref-hist.csv' every ::1 u (strptime("%Y-%m-%d",strcol(1))) nooutput
stats infile every ::1 u (strptime("%Y-%m-%d",strcol(1))) nooutput
print ' -----Stats-(Timestamp)----'
print ' Start: ', strftime("%d. %B %Y",STATS_min)
print ' Ende: ', strftime("%d. %B %Y",STATS_max)
@ -68,7 +70,7 @@ do for [i=1:12:2] {
## gnuplot for SVG - gnuplot 4.2 / Ubuntu 8.10
set term svg size 800,400 font "Arial,16"
set outp 'TRY_exchange_rate_to_EUR_-_Turkish_Currency_and_Debt_Crisis_2018.svg'
set outp outfile
set style line 1 lt rgb 'blue' lw 1
#available currencies:
@ -76,7 +78,7 @@ set style line 1 lt rgb 'blue' lw 1
#USD,JPY,BGN,CYP,CZK,DKK,EEK,GBP,HUF,LTL,LVL,MTL,PLN,ROL,RON,SEK,SIT,SKK,CHF,ISK,NOK,HRK,RUB,TRL,TRY,AUD,BRL,CAD,CNY,HKD,IDR,ILS,INR,KRW,MXN,MYR,NZD,PHP,SGD,THB,ZAR
plot \
'eurofxref-hist.csv' \
infile \
usi 1:(1/$26) axis x1y1 tit '1 TRY in EUR' lt rgb 'blue' lw 1,\
'eurofxref-hist.csv' \
infile \
usi 1:(1/$26) axis x1y1 notit w p lc rgb 'black' lt 1 lw 1.5 pt 7 ps 0.1 \

Loading…
Cancel
Save