File: linkedaxes.dem

package info (click to toggle)
gnuplot 5.0.5%2Bdfsg1-6%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 12,800 kB
  • ctags: 8,062
  • sloc: ansic: 78,152; cpp: 6,981; makefile: 2,075; sh: 1,343; lisp: 655; perl: 302; awk: 235; pascal: 194; tcl: 88; python: 46
file content (43 lines) | stat: -rw-r--r-- 1,331 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#
# 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://www.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://www.bmsc.washington.edu/scatter/data/Br.dat"
Tadata = "< GET http://www.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

pause -1 "Hit return to continue"
reset