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

  1. #
  2. # Show some of the new polar capabilities.
  3. #
  4. set polar
  5. set dummy x
  6. set samples 160
  7. set xrange [0:2*pi]
  8. set title "Three circles (with aspect ratio distortion)"
  9. plot .5,1,1.5
  10. pause -1 "Hit return"
  11. set title ""
  12.  
  13. plot cos(2*x)
  14. pause -1 "Hit return"
  15.  
  16. plot 2*sqrt(cos(x)),-2*sqrt(cos(x))
  17. pause -1 "Hit return"
  18.  
  19. set offset pi/4,pi/4,0,0
  20. plot sin(4*x),cos(4*x)
  21. set offset 0,0,0,0
  22. pause -1 "Hit return"
  23.  
  24. set yrange [-5:5]
  25. plot x/cos(3*x)
  26. pause -1 "Hit return"
  27. set autoscale
  28.  
  29. plot 1-sin(x)
  30. pause -1 "Hit return"
  31.  
  32. set xrange [0:12*pi]
  33. plot 2*x
  34. pause -1 "Hit return"
  35.  
  36. butterfly(x)=exp(cos(x))-2*cos(4*x)+sin(x/12)**5
  37. set samples 800
  38. pause 0 "This is a big one (many samples), be patient..."
  39. set title "Butterfly"
  40. set nokey
  41. plot butterfly(x)
  42. pause -1 "Hit return"
  43.  
  44. # undo what we've done above
  45. set nopolar
  46. set samples 160
  47. set autoscale xy
  48. set title ""
  49. set offset 0,0,0,0
  50. set key
  51.