File: lineargraph.asy

package info (click to toggle)
asymptote 2.15-2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 10,732 kB
  • sloc: cpp: 57,310; ansic: 4,491; python: 3,919; perl: 1,557; lisp: 1,363; yacc: 554; makefile: 548; sh: 523; lex: 442
file content (16 lines) | stat: -rw-r--r-- 373 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import graph;

size(250,200,IgnoreAspect);

real Sin(real t) {return sin(2pi*t);}
real Cos(real t) {return cos(2pi*t);}

draw(graph(Sin,0,1),red,"$\sin(2\pi x)$");
draw(graph(Cos,0,1),blue,"$\cos(2\pi x)$");

xaxis("$x$",BottomTop,LeftTicks);
yaxis("$y$",LeftRight,RightTicks(trailingzero));

label("LABEL",point(0),UnFill(1mm));

attach(legend(),truepoint(E),20E,UnFill);