Jonathan Golder 3 years ago
parent
commit
857e1e3932
2 changed files with 177 additions and 0 deletions
  1. +90
    -0
      gnuplot_scripts/Euro_exchange_rate_to_TRY_6000px_wide.plt
  2. +87
    -0
      gnuplot_scripts/Euro_exchange_rate_to_TRY_800px_wide.plt

+ 90
- 0
gnuplot_scripts/Euro_exchange_rate_to_TRY_6000px_wide.plt View File

@ -0,0 +1,90 @@
# based on code of [[User:Gorgo]]/[[:c:File:Euro exchange rate to TRY.svg]]
# gnuplot script for plotting eurofxref-hist.csv as obtained from
# http://www.ecb.int/stats/exchange/eurofxref/html/index.en.html
# download and unzip data if not available - delete eurofxref* to force new download.
# remove or comment out these lines in Windows/MacOS.
! [ -f eurofxref-hist.csv ] || wget http://www.ecb.int/stats/eurofxref/eurofxref-hist.zip
! [ -f eurofxref-hist.csv ] || unzip eurofxref-hist.zip
# Start und Ende ermitteln (z.Zt. nur für Consolenausagabe)
stats 'eurofxref-hist.csv' 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)
print ' --------------------------'
# Datum des letzten Updates oben links setzen
set label 'last update: ' . strftime("%Y-%m-%d",STATS_max) at screen 0.87, screen 0.9
#input
set timefmt "%Y-%m-%d"
set datafile missing 'N/A'
set datafile separator ','
#output
set key bottom right
set style data lines
set border 11 # Rahmen unten (Bit 1) und links (+ Bit 2)
set grid # Gitterlinien verwenden
# Gitterlinienen per Hand setzen falls gewünscht
set style line 1 linetype rgb '#696969' linewidth 0.5 dashtype 0 # Def. Major-grid
set style line 2 linetype rgb '#C9C9C9' linewidth 0.5 dashtype 3 # def. Minor-grid
set grid xtics mxtics # eventuell noxtics und nomxtics
set grid ytics mytics # eventuell noytics und nomytics
set grid back # Gitter im Hintergrund
set grid linestyle 1, linestyle 2 # Setzen des linestyle für Major u. Minor
set xdata time
set format x '%Y'
set xrange ['1998-12-31':'2018-11-01']
set xrange ['1998-12-31':STATS_max + 60*60*24*21] # 21 Tage 'Luft'
set xtics '01.01.1950', 60 * 60 * 24 * 365.25 * 1
set xtics nomirror
set mxtics 12
#set xlabel 'Date'
set ylabel 'TRY'
set y2label 'TRY'
set format y '%.0f'
set format y2 '%.0f'
set ytics 1
set y2tics 1
set mytics 5
set my2tics 5
# Zebramuster
set style rect fillcolor lt -1 fillstyle solid 0.04 noborder
do for [i=1950:2050:1] {
rec_q1_begin =sprintf("%1.4d-04-01",i)
rec_q2_begin =sprintf("%1.4d-07-01",i)
rec_q3_begin =sprintf("%1.4d-10-01",i)
rec_end =sprintf("%1.4d-01-01",i + 1)
set object rectangle from rec_q1_begin,graph 0 to rec_end, graph 1
set object rectangle from rec_q2_begin,graph 0 to rec_end, graph 1
set object rectangle from rec_q3_begin,graph 0 to rec_end, graph 1
}
## gnuplot for SVG - gnuplot 4.2 / Ubuntu 8.10
set term svg size 6000,400 font "Arial,16"
set outp 'Euro exchange rate to TRY (6000px wide).svg'
set style line 1 lt rgb 'blue' lw 1
#available currencies:
#first one is $2, second $3 and so on
#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' \
usi 1:($26) axis x1y1 tit '1 EUR in TRY' lt rgb 'blue' lw 1,\
'eurofxref-hist.csv' \
usi 1:($25/1000000) axis x1y1 tit '1 EUR in 1 000 000 TRL' lt rgb 'dark-violet' lw 1,\
'eurofxref-hist.csv' \
usi 1:($26) axis x1y1 notit w p lc rgb 'black' lt 1 lw 1.5 pt 7 ps 0.06 ,\
'eurofxref-hist.csv' \
usi 1:($25/1000000) axis x1y1 notit w p lc rgb 'black' lt 1 lw 1.5 pt 7 ps 0.06 ,\

+ 87
- 0
gnuplot_scripts/Euro_exchange_rate_to_TRY_800px_wide.plt View File

@ -0,0 +1,87 @@
# based on code of [[User:Gorgo]]/[[:c:File:Euro exchange rate to TRY.svg]]
# gnuplot script for plotting eurofxref-hist.csv as obtained from
# http://www.ecb.int/stats/exchange/eurofxref/html/index.en.html
# download and unzip data if not available - delete eurofxref* to force new download.
# remove or comment out these lines in Windows/MacOS.
! [ -f eurofxref-hist.csv ] || wget http://www.ecb.int/stats/eurofxref/eurofxref-hist.zip
! [ -f eurofxref-hist.csv ] || unzip eurofxref-hist.zip
# Start und Ende ermitteln (z.Zt. nur für Consolenausagabe)
stats 'eurofxref-hist.csv' 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)
print ' --------------------------'
# Datum des letzten Updates oben links setzen
# set label 'last update: ' . strftime("%d.%m.%Y",STATS_max) at graph 0.1, graph 0.9
#input
set timefmt "%Y-%m-%d"
set datafile missing 'N/A'
set datafile separator ','
#output
set key bottom right
set style data lines
set border 9 # Rahmen unten (Bit 1) und links (+ Bit 2)
unset grid # Gitterlinien verwenden
# Gitterlinienen per Hand setzen falls gewünscht
set style line 1 linetype rgb '#696969' linewidth 0.5 dashtype 0 # Def. Major-grid
set style line 2 linetype rgb '#C9C9C9' linewidth 0.5 dashtype 3 # def. Minor-grid
set grid xtics mxtics # eventuell noxtics und nomxtics
set grid y2tics my2tics # eventuell noytics und nomytics
set grid back # Gitter im Hintergrund
set grid linestyle 1, linestyle 2 # Setzen des linestyle für Major u. Minor
set xdata time
set format x '%Y'
set xrange ['1998-12-31':STATS_max + 60*60*24*150] # 150 Tage 'Luft'
set xtics '01.01.1950', 60 * 60 * 24 * 365.25 * 5
set xtics nomirror
set mxtics 5
# set xlabel 'Date'
unset ylabel
set y2label 'TRY'
unset format y
set format y2 '%.0f'
unset ytics
set y2tics 1
unset mytics
set my2tics 5
# set ytics nomirror
set y2tics nomirror
# Zebramuster
set style rect fillcolor lt -1 fillstyle solid 0.03 noborder
do for [i=1950:2050:1] {
rec_q1_begin =sprintf("%1.4d-04-01",i)
rec_q2_begin =sprintf("%1.4d-07-01",i)
rec_q3_begin =sprintf("%1.4d-10-01",i)
rec_end =sprintf("%1.4d-01-01",i + 1)
set object rectangle from rec_q1_begin,graph 0 to rec_end, graph 1
set object rectangle from rec_q2_begin,graph 0 to rec_end, graph 1
set object rectangle from rec_q3_begin,graph 0 to rec_end, graph 1
}
## 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 (800px wide).svg'
set style line 1 lt rgb 'blue' lw 1
#available currencies:
#first one is $2, second $3 and so on
#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' \
usi 1:($26) axis x1y2 tit '1 EUR in TRY' lt rgb 'blue' lw 1,\
'eurofxref-hist.csv' \
usi 1:($25/1000000) axis x1y2 tit '1 EUR in 1 000 000 TRL' lt rgb 'dark-violet' lw 1,\

Loading…
Cancel
Save