Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-release > by-pkgid > 97aea805d7769ff00c42a2832ddab6a9 > files > 274

asymptote-2.41-1.mga6.armv5tl.rpm

import graph; 
size(8cm,6cm,IgnoreAspect); 
 
typedef real realfcn(real); 
realfcn F(real p) { 
  return new real(real x) {return sin(p*x);}; 
}; 
 
for(int i=1; i < 5; ++i)
  draw(graph(F(i*pi),0,1),Pen(i),
       "$\sin("+(i == 1 ? "" : (string) i)+"\pi x)$"); 
xaxis("$x$",BottomTop,LeftTicks); 
yaxis("$y$",LeftRight,RightTicks(trailingzero)); 
 
attach(legend(2),(point(S).x,truepoint(S).y),10S,UnFill);