gnuplot.tst 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. on demo;
  2. plot(sin x,x=(-3 .. 3));
  3. plot(s=sin phi,phi=(-3 .. 3));
  4. plot(sin phi,cos phi,phi=(-3 .. 3));
  5. plot(sin(1/x),x=(-1 .. 1),y=(-3 .. 3));
  6. plot(sin(1/x),x=(-10 .. 10));
  7. plot(y=tan x,y=(-10 .. 10));
  8. plot (cos sqrt(x**2 + y**2),x=(-3 .. 3),y=(-3 .. 3));
  9. plot (cos sqrt(x**2 + y**2),x=(-3 .. 3),y=(-3 .. 3),hidden3d);
  10. plot(x*y, x=(0 .. 2), y=(0 .. 2));
  11. plot(x*y, x=(-2 .. 2), y=(-2 .. 2));
  12. plot(x+y, x=(0 .. 2), y=(0 .. 2));
  13. plot(1/(x**2+y**2),x=(-0.5 .. 0.5),y=(-0.5 .. 0.5));
  14. plot(1/(x**2+y**2),x=(-0.5 .. 0.5),y=(-0.5 .. 0.5),hidden3d);
  15. plot(1/(x**2+y**2),x=(0.1 .. 5),y=(0.1 .. 5),size="0.7,1");
  16. plot(1/(x**2+y**2),x=(0.1 .. 5),y=(0.1 .. 5),view="30,89");
  17. plot(1/(x**2+y**2),x=(-0.5 .. 0.5),y=(-0.5 .. 0.5),
  18. hidden3d,contour,view="70,20");
  19. % this may be slow on some machines because of
  20. % a delicate evaluation context.
  21. plot(sinh(x*y)/sinh(2*x*y),hidden3d);
  22. % general curves and surfaces computed as lists of data points
  23. plot {{0,0},{0,1},{1,1},{0,0},{1,0},{0,1},{0.5,1.5},{1,1},{1,0}};
  24. on rounded;
  25. w:=for j:=1:200 collect {1/j*sin j,1/j*cos j,j/200}$
  26. plot w;
  27. % the following examples need some computing time
  28. w:= {for j:=1 step 0.1 until 20 collect
  29. {1/j*sin j,1/j*cos j,j},
  30. for j:=1 step 0.1 until 20 collect
  31. {(0.1+1/j)*sin j,(0.1+1/j)*cos j,j}
  32. }$
  33. plot w;
  34. dd:=pi/15;
  35. w:=for u:=dd step dd until pi-dd collect
  36. for v:=0 step dd until 2pi collect
  37. {sin(u)*cos(v), sin(u)*sin(v), cos(u)}$
  38. plot w;
  39. plotreset;
  40. end;