Graphgrid.asy

Revision as of 21:16, 16 November 2017 by Lord baltimore (talk | contribs) (A template for Asymptote graph creation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template:Graphgrid.asy

Graphgrid.asy is a template created by user Lord_Baltimore to allow easy creation of equation graphs in the Cartesian plane. Its code is shown below:


[asy] size(400); //You can adjust this parameter to your needs - it's the size of the whole graph.

draw((-10,-11)--(-10,11),rgb(.7,.7,.7));draw((-9,-11)--(-9,11),rgb(.7,.7,.7));draw((-8,-11)--(-8,11),rgb(.7,.7,.7));draw((-7,-11)--(-7,11),rgb(.7,.7,.7));draw((-6,-11)--(-6,11),rgb(.7,.7,.7));draw((-5,-11)--(-5,11),rgb(.7,.7,.7));draw((-4,-11)--(-4,11),rgb(.7,.7,.7));draw((-3,-11)--(-3,11),rgb(.7,.7,.7));draw((-2,-11)--(-2,11),rgb(.7,.7,.7));draw((-1,-11)--(-1,11),rgb(.7,.7,.7));draw((-0,-11)--(0,11),rgb(.7,.7,.7));draw((1,-11)--(1,11),rgb(.7,.7,.7));draw((2,-11)--(2,11),rgb(.7,.7,.7));draw((3,-11)--(3,11),rgb(.7,.7,.7));draw((4,-11)--(4,11),rgb(.7,.7,.7));draw((5,-11)--(5,11),rgb(.7,.7,.7));draw((6,-11)--(6,11),rgb(.7,.7,.7));draw((7,-11)--(7,11),rgb(.7,.7,.7));draw((8,-11)--(8,11),rgb(.7,.7,.7));draw((9,-11)--(9,11),rgb(.7,.7,.7));draw((10,-11)--(10,11),rgb(.7,.7,.7));draw((-11,10)--(11,10),rgb(.7,.7,.7));draw((-11,9)--(11,9),rgb(.7,.7,.7));draw((-11,8)--(11,8),rgb(.7,.7,.7));draw((-11,7)--(11,7),rgb(.7,.7,.7));draw((-11,6)--(11,6),rgb(.7,.7,.7));draw((-11,5)--(11,5),rgb(.7,.7,.7));draw((-11,4)--(11,4),rgb(.7,.7,.7));draw((-11,3)--(11,3),rgb(.7,.7,.7));draw((-11,2)--(11,2),rgb(.7,.7,.7));draw((-11,1)--(11,1),rgb(.7,.7,.7));draw((-11,0)--(11,0),rgb(.7,.7,.7));draw((-11,-1)--(11,-1),rgb(.7,.7,.7));draw((-11,-2)--(11,-2),rgb(.7,.7,.7));draw((-11,-3)--(11,-3),rgb(.7,.7,.7));draw((-11,-4)--(11,-4),rgb(.7,.7,.7));draw((-11,-5)--(11,-5),rgb(.7,.7,.7));draw((-11,-6)--(11,-6),rgb(.7,.7,.7));draw((-11,-7)--(11,-7),rgb(.7,.7,.7));draw((-11,-8)--(11,-8),rgb(.7,.7,.7));draw((-11,-9)--(11,-9),rgb(.7,.7,.7));draw((-11,-10)--(11,-10),rgb(.7,.7,.7));draw((11,0)--(-11,0),blue,Arrows);draw((0,11)--(0,-11),blue,Arrows);label("$y$",(0,11),N);label("$-y$",(0,-11),S);label("$x$",(11,0),E);label("$-x$",(-11,0),W);

//red dot dot((0,0),linewidth(5)+red); label("$\textcolor{red}{(0,0)}$",(0,0),SW);

//green dot dot((1,2),linewidth(5)+green); label("$\textcolor{green}{(1,2)}$",(1,2),NE);

//blue dot dot((-7,5),linewidth(5)+blue); label("$\textcolor{blue}{(-7,5)}$",(-7,5),NW);

//cyan dot dot((-1,-6),linewidth(5)+cyan); label("$\textcolor{cyan}{(-1,-6)}$",(-1,-6),SW);

//magenta dot dot((5,-5),linewidth(5)+magenta); label("$\textcolor{magenta}{(5,-5)}$",(5,-5),SE);

[/asy]


Anyone can use this, for anything.