1

Here is the code.

settings.outformat="pdf";
import graph;

size(4cm, 0cm);
defaultpen(fontsize(16pt) + linewidth(1));

xaxis("$x$", xmin=-1, xmax=1);
yaxis("$y$", ymin=-1, ymax=1);
labelx(0, align=S+W, L=Label(Draw));

It produces this:

enter image description here

The bounding box around the 0 label has different padding values on top and bottom. Is there a way to make it symmetrical?

1

I don't know why the labelx is doing that or how to fix it, but you could use a standard label command instead.

settings.outformat="pdf";
import graph;

size(4cm, 0cm);
defaultpen(fontsize(16pt) + linewidth(1));

xaxis("$x$", xmin=-1, xmax=1);
yaxis("$y$", ymin=-1, ymax=1);
labelx(0, align=S+W, L=Label(Draw));
label("0", (0,0), 2*SE, Draw());

enter image description here

| improve this answer | |
  • That was an easy fix :-) – MindV0rtex Apr 13 '16 at 0:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.