home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 334_02 / param.dem < prev    next >
Text File  |  1991-02-05  |  872b  |  47 lines

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