[metapost] Positioning labels at a vertex

Troy Henderson thenders at gmail.com
Wed Nov 17 13:40:22 CET 2010


I'm not sure I fully understand your problem.  A "trick" that I use is
to set a scale factor (I almost always use "u") in the very beginning
of my code, and then everything I draw is relative to this scale
factor.  For example, consider the following code snippet.

draw fullcircle scaled (2*u);
label(btex $\bullet$ etex,origin);
label.bot(btex $O$ etex,origin);
draw origin--(u*dir 45);
label.ulft(btex $r$ etex,u/2*dir 45);

This looks just fine.  If I change my scale factor u from 36 to 72,
say, then the same graphic looks just fine.  If I'm misunderstanding
your question, please let me know.


More information about the metapost mailing list