home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / GNUPDEMO.ZIP / param.demo < prev    next >
Text File  |  1992-03-25  |  978b  |  50 lines

  1. #
  2. # $Id: param.demo,v 3.26 92/03/24 22:32:22 woo Exp Locker: woo $
  3. #
  4. #
  5. # Show some of the new parametric capabilities.
  6. #
  7. set parametric
  8. set dummy t
  9. set autoscale
  10. set samples 160
  11. set title ""
  12. plot t,sin(t)/t title "t,sin(t)/t or sin(x)/x"
  13. pause -1 "Hit return to continue"
  14.  
  15. plot sin(t)/t,t
  16. pause -1 "Hit return to continue"
  17.  
  18. plot sin(t),cos(t)
  19. pause -1 "Hit return to continue"
  20.  
  21. set xrange [-3:3]
  22. set yrange [-3:3]
  23. set title "Parametric Conic Sections"
  24. plot -t,t,cos(t),cos(2*t),2*cos(t),sin(t),-cosh(t),sinh(t)
  25. set title ""
  26. pause -1 "Hit return to continue"
  27.  
  28. set xrange [-5:5]
  29. set yrange [-5:5]
  30. plot tan(t),t,t,tan(t)
  31. pause -1 "Hit return to continue"
  32.  
  33. set trange [-3:3]
  34. plot t,log(t),-t,log(t),sin(t),t**2
  35. pause -1 "Hit return to continue"
  36.  
  37. set autoscale x
  38. set yrange [-1.5:1.5]
  39. set trange [0:10*pi]
  40. plot sin(t)/t,cos(t)/t
  41. pause -1 "Hit return to continue"
  42.  
  43. # undo what we've done above
  44. set noparametric
  45. set samples 160
  46. set autoscale xy
  47. set title ""
  48. set offset 0,0,0,0
  49. set key
  50.