Skip to main content
replaced http://tex.stackexchange.com/ with https://tex.stackexchange.com/
Source Link

And here is a fairly generic MetapostMetapost approach to making a grid. Follow the link for an introduction to Metapost and how to use this code in a LaTeX document.

enter image description here

prologues := 3; outputtemplate := "%j%c.eps"; beginfig(1); u = 1cm; ymax = xmax = 4.75; xmin = ymin = -4.75; path xx, yy; xx = ((xmin,0) -- (xmax,0)) scaled u; yy = ((0,ymin) -- (0,ymax)) scaled u; drawoptions(dashed evenly scaled .5 withcolor .7 white); for i = ceiling ymin upto floor ymax: draw xx shifted (0,i*u); endfor for i = ceiling xmin upto floor xmax: draw yy shifted (i*u,0); endfor drawoptions(withpen pencircle scaled .7); xx := xx scaled 1.05; yy := yy scaled 1.05; drawarrow xx; drawarrow yy; drawoptions(); label.rt (btex $x$ etex, point infinity of xx); label.top(btex $y$ etex, point infinity of yy); endfig; end. 

And here is a fairly generic Metapost approach to making a grid. Follow the link for an introduction to Metapost and how to use this code in a LaTeX document.

enter image description here

prologues := 3; outputtemplate := "%j%c.eps"; beginfig(1); u = 1cm; ymax = xmax = 4.75; xmin = ymin = -4.75; path xx, yy; xx = ((xmin,0) -- (xmax,0)) scaled u; yy = ((0,ymin) -- (0,ymax)) scaled u; drawoptions(dashed evenly scaled .5 withcolor .7 white); for i = ceiling ymin upto floor ymax: draw xx shifted (0,i*u); endfor for i = ceiling xmin upto floor xmax: draw yy shifted (i*u,0); endfor drawoptions(withpen pencircle scaled .7); xx := xx scaled 1.05; yy := yy scaled 1.05; drawarrow xx; drawarrow yy; drawoptions(); label.rt (btex $x$ etex, point infinity of xx); label.top(btex $y$ etex, point infinity of yy); endfig; end. 

And here is a fairly generic Metapost approach to making a grid. Follow the link for an introduction to Metapost and how to use this code in a LaTeX document.

enter image description here

prologues := 3; outputtemplate := "%j%c.eps"; beginfig(1); u = 1cm; ymax = xmax = 4.75; xmin = ymin = -4.75; path xx, yy; xx = ((xmin,0) -- (xmax,0)) scaled u; yy = ((0,ymin) -- (0,ymax)) scaled u; drawoptions(dashed evenly scaled .5 withcolor .7 white); for i = ceiling ymin upto floor ymax: draw xx shifted (0,i*u); endfor for i = ceiling xmin upto floor xmax: draw yy shifted (i*u,0); endfor drawoptions(withpen pencircle scaled .7); xx := xx scaled 1.05; yy := yy scaled 1.05; drawarrow xx; drawarrow yy; drawoptions(); label.rt (btex $x$ etex, point infinity of xx); label.top(btex $y$ etex, point infinity of yy); endfig; end. 
make link more obvious
Source Link
Thruston
  • 48.2k
  • 4
  • 79
  • 164

And here is a fairly generic Metapost approach to making a grid. Follow the link for an introduction to Metapost and how to use this code in a LaTeX document.

enter image description here

prologues := 3; outputtemplate := "%j%c.eps"; beginfig(1); u = 1cm; ymax = xmax = 4.75; xmin = ymin = -4.75; path xx, yy; xx = ((xmin,0) -- (xmax,0)) scaled u; yy = ((0,ymin) -- (0,ymax)) scaled u; drawoptions(dashed evenly scaled .5 withcolor .7 white); for i = ceiling ymin upto floor ymax: draw xx shifted (0,i*u); endfor for i = ceiling xmin upto floor xmax: draw yy shifted (i*u,0); endfor drawoptions(withpen pencircle scaled .7); xx := xx scaled 1.05; yy := yy scaled 1.05; drawarrow xx; drawarrow yy; drawoptions(); label.rt (btex $x$ etex, point infinity of xx); label.top(btex $y$ etex, point infinity of yy); endfig; end. 

And here is a fairly generic Metapost approach to making a grid.

enter image description here

prologues := 3; outputtemplate := "%j%c.eps"; beginfig(1); u = 1cm; ymax = xmax = 4.75; xmin = ymin = -4.75; path xx, yy; xx = ((xmin,0) -- (xmax,0)) scaled u; yy = ((0,ymin) -- (0,ymax)) scaled u; drawoptions(dashed evenly scaled .5 withcolor .7 white); for i = ceiling ymin upto floor ymax: draw xx shifted (0,i*u); endfor for i = ceiling xmin upto floor xmax: draw yy shifted (i*u,0); endfor drawoptions(withpen pencircle scaled .7); xx := xx scaled 1.05; yy := yy scaled 1.05; drawarrow xx; drawarrow yy; drawoptions(); label.rt (btex $x$ etex, point infinity of xx); label.top(btex $y$ etex, point infinity of yy); endfig; end. 

And here is a fairly generic Metapost approach to making a grid. Follow the link for an introduction to Metapost and how to use this code in a LaTeX document.

enter image description here

prologues := 3; outputtemplate := "%j%c.eps"; beginfig(1); u = 1cm; ymax = xmax = 4.75; xmin = ymin = -4.75; path xx, yy; xx = ((xmin,0) -- (xmax,0)) scaled u; yy = ((0,ymin) -- (0,ymax)) scaled u; drawoptions(dashed evenly scaled .5 withcolor .7 white); for i = ceiling ymin upto floor ymax: draw xx shifted (0,i*u); endfor for i = ceiling xmin upto floor xmax: draw yy shifted (i*u,0); endfor drawoptions(withpen pencircle scaled .7); xx := xx scaled 1.05; yy := yy scaled 1.05; drawarrow xx; drawarrow yy; drawoptions(); label.rt (btex $x$ etex, point infinity of xx); label.top(btex $y$ etex, point infinity of yy); endfig; end. 
Source Link
Thruston
  • 48.2k
  • 4
  • 79
  • 164

And here is a fairly generic Metapost approach to making a grid.

enter image description here

prologues := 3; outputtemplate := "%j%c.eps"; beginfig(1); u = 1cm; ymax = xmax = 4.75; xmin = ymin = -4.75; path xx, yy; xx = ((xmin,0) -- (xmax,0)) scaled u; yy = ((0,ymin) -- (0,ymax)) scaled u; drawoptions(dashed evenly scaled .5 withcolor .7 white); for i = ceiling ymin upto floor ymax: draw xx shifted (0,i*u); endfor for i = ceiling xmin upto floor xmax: draw yy shifted (i*u,0); endfor drawoptions(withpen pencircle scaled .7); xx := xx scaled 1.05; yy := yy scaled 1.05; drawarrow xx; drawarrow yy; drawoptions(); label.rt (btex $x$ etex, point infinity of xx); label.top(btex $y$ etex, point infinity of yy); endfig; end.