File talk:Euroindexdollaryenpound.png

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

To update this page I used Ubuntu Linux, opened a shell and typed "gnuplot", then I did drag and drop the following text into the shell:

# 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.zip ] || wget http://www.ecb.int/stats/eurofxref/eurofxref-hist.zip
! [ -f eurofxref-hist.csv ] || unzip eurofxref-hist.zip

# strip commas and comment lines from the CSV file and write the result in 'euro.dat'.
# (remove this line in Windows and do it by hand)
! perl -ne "s@N/A@0@g; s/,/ /g; /^[0-9]/ || next; print; " eurofxref-hist.csv > euro.dat


set timefmt "%Y-%m-%d"
set xdata time
set format x '%y-%b'
set ylabel 'Indexed exchange rates'
set xlabel 'Date'
set grid
set style data lines
set key top left
## gnuplot version with Fedora Core 3
# set term png small picsize 600 400 xffffff x000000 xa0a0a0 x00bf00 xbf0000 x0000bf
## gnuplot version with Ubuntu Linux 6
set term png small size 600,400 xffffff x000000 xa0a0a0 x00bf00 xbf0000 x0000bf

set outp 'Euro exchange rate to USD, JPY, and GBP.png'
set style line 1 lt 1 lw 2
set style line 2 lt 2 lw 2
set style line 3 lt 3 lw 2
plot \
    'euro.dat' \
    usi 1:($2/1.1789) title '1=1.18 USD' ls 1, \
    '' usi 1:($3/133.73) title '1=134 JPY' ls 2, \
    '' usi 1:($9/0.711) title '1=0.71 GBP' ls 3

For further questions please don't hesitate to ask here. --Tubesship (talk) 15:57, 17 March 2008 (UTC)[reply]