[NTG-context] Add labels to a grid (Metafun)
Fabrice
couvreur.fabrice at wanadoo.fr
Fri Mar 6 19:11:49 CET 2015
thank you very much Alain, I think I understood for the format "@d" but
for other formats, I will need documentation.
Fabrice
\definecolor[mycolor][c=.4,m=0,y=0,k=0]
\starttext
\start
\switchtobodyfont[small]
\startMPcode
xmin := 0; xmax := 22; ymax :=460 ;ymin:=0; u := 0.5cm; v:= 0.025cm;
drawoptions(withpen pencircle scaled 0.5pt withcolor
\MPcolor{mycolor});
draw hlingrid(ymin,ymax,20,11.5cm,11cm);
draw vlingrid(xmin,xmax,2,11cm,11.5cm);
drawoptions(withpen pencircle scaled 1pt) ;
drawarrow (0,0)--(22,0) scaled u ;
drawarrow (0,0)--(0,460) scaled v ;
draw vlintext(0,20,2,10cm,"@d") shifted (0,-0.25cm) ;
draw hlintext(0,420,20,11cm,"@d") shifted (-0.35cm,0) ;
label.bot( "$x$",(10.8cm,-0.1cm)) ;
label.lft( "$y$",(-0.1cm,11.4cm)) ;
\stopMPcode
\stop
\stoptext
More information about the ntg-context
mailing list