Back to demo index

gnuplot demo script: linkedaxes.dem

autogenerated by webify.pl on Fri May 24 14:06:23 2024
gnuplot version gnuplot 6.0 patchlevel 1
#
# Demo for non-linear linked axes. 
# In this example x2 is proportional to 1/x.
# X axis is X-ray energy in eV; x2 axis is wavelength in Angstroms.
#
# The scattering data are pulled from the web using the GET
# command, which is provided by the perl-libwww module.
# You could replace it with wget or some other download tool, or you
# could manually download the data first and then plot from the local copy.
#
# For more information on the plot itself see
#	http://skuld.bmsc.washington.edu/scatter
#
# Ethan A Merritt - August 2012
#
set encoding utf8
set key outside Left
set bmargin 5
set tmargin 6
set style data lines
set tics in
set ticslevel 0.5
set xlabel  "X-ray energy in eV"
set format y  '%5.1fe'
set title " Anomalous scattering factors "
set xrange  [9000:14400]
set offset 0,0,1.0,0
set xtics nomirror
set link x via 12398./x inverse 12398./x

set x2label  "X-ray wavelength in Å"
set x2tics 0.1  format "%.1f Å" nomirror

Brdata = "< GET http://skuld.bmsc.washington.edu/scatter/data/Br.dat"
Tadata = "< GET http://skuld.bmsc.washington.edu/scatter/data/Ta.dat"

plot Brdata volatile using 1:3 title 'Br f"'  lt 1 lw 3, \
'' volatile using 1:2 title "Br f'"  lt 1 lw 1, \
Tadata volatile using 1:3 title 'Ta f"' lt 2 lw 3, \
'' volatile using 1:2 title "Ta f'"  lt 2 lw 1


Click here for minimal script to generate this plot