home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / gp371os2.zip / demo / mgr.dem < prev    next >
Text File  |  1999-10-11  |  3KB  |  77 lines

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