File: mgr.dem

package info (click to toggle)
gnuplot 3.7.1p1-4
  • links: PTS
  • area: main
  • in suites: potato
  • size: 5,808 kB
  • ctags: 4,418
  • sloc: ansic: 43,279; lisp: 661; makefile: 647; asm: 539; sh: 416; objc: 379; csh: 297; pascal: 194; perl: 138
file content (76 lines) | stat: -rw-r--r-- 2,797 bytes parent folder | download | duplicates (2)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#
# $Id: mgr.dem,v 1.2.2.1 1999/10/11 13:24:57 lhecking Exp $
#
pause 0 "Watch some  cubic splines"
set samples 50
set xlabel "Angle (deg)"
set ylabel "Amplitude"
set key box
set title "Brag-Reflex -- Peak only"
plot "big_peak.dat" title "Rate" with errorbars, \
                 "" smooth csplines t "Rate"
pause -1 "You would draw smaller bars? <CR>"
set bars small
replot
set bars large
#
pause -1 "An approx-spline demo <CR>"
set samples 300
set xlabel "Time (sec)"
set ylabel "Rate"
set title "Ag 108 decay data"
plot "silver.dat" t "experimental" w errorb, \
               ""  smooth csplines t "cubic smooth"
# error is column 3; weight larger errors less
# start with rel error = 1/($3/$2)
pause -1 "Now apply a smoothing spline, weighted by 1/rel error <CR>"
S=1
plot "silver.dat" t "experimental" w errorb,\
               "" u 1:2:(S*$2/$3) smooth acsplines t "acspline Y/Z"
pause -1 "Make it smoother by changing the smoothing weights <CR>"
plot "silver.dat" t "rate" w errorb,\
               "" u 1:2:($2/($3*1.e1)) sm acs t "acspline Y/(Z*1.e1)",\
               "" u 1:2:($2/($3*1.e3)) sm acs t "         Y/(Z*1.e3)",\
               "" u 1:2:($2/($3*1.e5)) sm acs t "         Y/(Z*1.e5)"
pause -1 "Accentuate the relative changes with a log-scale <CR>"
set logscale y
replot
pause -1 "Now approximate the data with a bezier curve between the endpoints<CR>"
set nologscale y
plot "silver.dat" t "experimental" w errorb,\
               "" smooth sbezier t "bezier"
pause -1 "You would rather use log-scales ? <CR>"
set logscale y
plot "silver.dat" t "rate" w errorb, \
               "" smooth sbezier t "bezier"
#
pause -1 "Errorbar demo <CR>"
set samples 100
set nologscale
set xlabel "Resistance [Ohm]"
set ylabel "Power [W]"
set title "UM1-Cell Power"
n(x)=1.53**2*x/(5.67+x)**2
plot [0:50] "battery.dat" t "Power" with xyerrorbars, n(x) t "Theory" w lines
pause -1 "Would you like boxes? <CR>"
plot [0:50] "battery.dat" t "Power" with boxxy, n(x) t "Theory" w lines
pause -1 "Only X-Bars? <CR>"
plot [0:50] "battery.dat" u 1:2:3 t "Power" w xerr, n(x) t "Theory" w lines
pause -1 "Only Y-Bars? <CR>"
plot [0:50] "battery.dat" u 1:2:4 t "Power" w yerr, n(x) t "Theory" w lines
pause -1 "Logscaled? <CR>"
set logscale y
plot [0:50] "battery.dat" u 1:2:4 t "Power" w yerr, n(x) t "Theory" w lines
pause -1 "X as well? <CR>"
set logscale xy
plot [1:50] "battery.dat" t "Power" w xyerr, n(x) t "Theory" w lines
pause -1 "If you like bars without tics <CR>"
set nologscale
set bars small
plot [0:50] "battery.dat" t "Power" with xyerrorbars, n(x) t "Theory" w lines
pause -1 "X-Bars only <CR>"
plot [0:50] "battery.dat" u 1:2:3 t "Power" w xerr, n(x) t "Theory" w lines
pause -1 "Y-Bars only <CR>"
plot [0:50] "battery.dat" u 1:2:4 t "Power" w yerr, n(x) t "Theory" w lines
reset