Annotation of OpenXM_contrib/gnuplot/demo/mgr.dem, Revision 1.1
1.1 ! maekawa 1: #
! 2: # $Id: mgr.dem,v 1.4 1997/01/05 22:03:11 drd Exp $
! 3: #
! 4: pause 0 "Watch some cubic splines"
! 5: set samples 50
! 6: set xlabel "Angle (deg)"
! 7: set ylabel "Amplitude"
! 8: set title "Brag-Reflex -- Peak only"
! 9: plot "big_peak.dat" title "Rate" with errorbars, \
! 10: "" smooth csplines t "Rate"
! 11: pause -1 "You would draw smaller bars? <CR>"
! 12: set bars small
! 13: replot
! 14: set bars large
! 15: #
! 16: pause -1 "An approx-spline demo <CR>"
! 17: set samples 300
! 18: set xlabel "Time (sec)"
! 19: set ylabel "Rate"
! 20: set title "Ag 108 decay data"
! 21: plot "silver.dat" t "experimental" w errorb, \
! 22: "" smooth csplines t "cubic smooth"
! 23: # error is column 3; weight larger errors less
! 24: # start with rel error = 1/($3/$2)
! 25: pause -1 "Now apply a smoothing spline, weighted by 1/rel error <CR>"
! 26: S=1
! 27: plot "silver.dat" t "experimental" w errorb,\
! 28: "" u 1:2:(S*$2/$3) smooth acsplines t "acspline Y/Z"
! 29: pause -1 "Make it smoother by changing the smoothing weights <CR>"
! 30: plot "silver.dat" t "rate" w errorb,\
! 31: "" u 1:2:($2/($3*1.e1)) sm acs t "acspline Y/(Z*1.e1)",\
! 32: "" u 1:2:($2/($3*1.e3)) sm acs t " Y/(Z*1.e3)",\
! 33: "" u 1:2:($2/($3*1.e5)) sm acs t " Y/(Z*1.e5)"
! 34: pause -1 "Accentuate the relative changes with a log-scale <CR>"
! 35: set logscale y
! 36: replot
! 37: pause -1 "Now approximate the data with a bezier curve between the endpoints<CR>"
! 38: set nologscale y
! 39: plot "silver.dat" t "experimental" w errorb,\
! 40: "" smooth sbezier t "bezier"
! 41: pause -1 "You would rather use log-scales ? <CR>"
! 42: set logscale y
! 43: plot "silver.dat" t "rate" w errorb, \
! 44: "" smooth sbezier t "bezier"
! 45: #
! 46: pause -1 "Errorbar demo <CR>"
! 47: set samples 100
! 48: set nologscale
! 49: set xlabel "Resistance [Ohm]"
! 50: set ylabel "Power [W]"
! 51: set title "UM1-Cell Power"
! 52: n(x)=1.53**2*x/(5.67+x)**2
! 53: plot [0:50] "battery.dat" t "Power" with xyerrorbars, n(x) t "Theory" w lines
! 54: pause -1 "Would you like boxes? <CR>"
! 55: plot [0:50] "battery.dat" t "Power" with boxxy, n(x) t "Theory" w lines
! 56: pause -1 "Only X-Bars? <CR>"
! 57: plot [0:50] "battery.dat" u 1:2:3 t "Power" w xerr, n(x) t "Theory" w lines
! 58: pause -1 "Only Y-Bars? <CR>"
! 59: plot [0:50] "battery.dat" u 1:2:4 t "Power" w yerr, n(x) t "Theory" w lines
! 60: pause -1 "Logscaled? <CR>"
! 61: set logscale y
! 62: plot [0:50] "battery.dat" u 1:2:4 t "Power" w yerr, n(x) t "Theory" w lines
! 63: pause -1 "X as well? <CR>"
! 64: set logscale xy
! 65: plot [1:50] "battery.dat" t "Power" w xyerr, n(x) t "Theory" w lines
! 66: pause -1 "If you like bars without tics <CR>"
! 67: set nologscale
! 68: set bars small
! 69: plot [0:50] "battery.dat" t "Power" with xyerrorbars, n(x) t "Theory" w lines
! 70: pause -1 "X-Bars only <CR>"
! 71: plot [0:50] "battery.dat" u 1:2:3 t "Power" w xerr, n(x) t "Theory" w lines
! 72: pause -1 "Y-Bars only <CR>"
! 73: plot [0:50] "battery.dat" u 1:2:4 t "Power" w yerr, n(x) t "Theory" w lines
! 74: set bars large
! 75:
! 76: set xlabel ""
! 77: set ylabel ""
! 78: set title ""
! 79:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>