home *** CD-ROM | disk | FTP | other *** search
/ c't freeware shareware 1999 February / CT_SW9902.ISO / pc / software / wissen / daten / gnuplot.hqx / gnuplot.2.0b4 / Scripts / demo / mgr.dem < prev    next >
Text File  |  1997-05-03  |  3KB  |  75 lines

  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. S=0.001
  31. plot "silver.dat" t "rate" w errorb,\
  32.                "" u 1:2:(S*$2/$3) smooth acsplines t "acspline 0.001*Y/Z"
  33. pause -1 "Now approximate the data with a bezier curve<CR>"
  34. plot "silver.dat" t "experimental" w errorb,\
  35.                "" smooth sbezier t "bezier"
  36. pause -1 "You would rather use log-scales ? <CR>"
  37. set logscale y
  38. plot "silver.dat" t "rate" w errorb, \
  39.                "" smooth sbezier t "bezier"
  40. #
  41. pause -1 "Errorbar demo <CR>"
  42. set samples 100
  43. set nologscale
  44. set xlabel "Resistance [Ohm]"
  45. set ylabel "Power [W]"
  46. set title "UM1-Cell Power"
  47. n(x)=1.53**2*x/(5.67+x)**2
  48. plot [0:50] "battery.dat" t "Power" with xyerrorbars, n(x) t "Theory" w lines
  49. pause -1 "Would you like boxes? <CR>"
  50. plot [0:50] "battery.dat" t "Power" with boxxy, n(x) t "Theory" w lines
  51. pause -1 "Only X-Bars? <CR>"
  52. plot [0:50] "battery.dat" u 1:2:3 t "Power" w xerr, n(x) t "Theory" w lines
  53. pause -1 "Only Y-Bars? <CR>"
  54. plot [0:50] "battery.dat" u 1:2:4 t "Power" w yerr, n(x) t "Theory" w lines
  55. pause -1 "Logscaled? <CR>"
  56. set logscale y
  57. plot [0:50] "battery.dat" u 1:2:4 t "Power" w yerr, n(x) t "Theory" w lines
  58. pause -1 "X as well? <CR>"
  59. set logscale xy
  60. plot [1:50] "battery.dat" t "Power" w xyerr, n(x) t "Theory" w lines
  61. pause -1 "If you like bars without tics <CR>"
  62. set nologscale
  63. set bars small
  64. plot [0:50] "battery.dat" t "Power" with xyerrorbars, n(x) t "Theory" w lines
  65. pause -1 "X-Bars only <CR>"
  66. plot [0:50] "battery.dat" u 1:2:3 t "Power" w xerr, n(x) t "Theory" w lines
  67. pause -1 "Y-Bars only <CR>"
  68. plot [0:50] "battery.dat" u 1:2:4 t "Power" w yerr, n(x) t "Theory" w lines
  69. set bars large
  70.  
  71. set xlabel ""
  72. set ylabel ""
  73. set title ""
  74.  
  75.