# Specifying ticks in Asymptote 3D graph

How do I create 3D axes in Asymptote with customized tick locations? For instance, I know that

``````xaxis3("\$x\$",-1,1,black,OutTicks(2,2),Arrow3);
``````

produces an arrowed-axis with two intervals between -1 & 1, and each of these intervals has two subintervals. What if I wanted ticks at -1, -0.5 and 1? I've read the manual but frankly don't understand much of the `graph3` section.

## 1 Answer

A `tickmodifier` (I do not know how it works) can be used (as in brokenaxis) to remove some automatic ticks. Another possibility is to specify the ticks values, as in the following example

``````import graph3;
size(0,200);
size3(200,IgnoreAspect);

currentprojection=perspective(5,2,2);

scale(Linear,Linear,Log);

real[] myxchoice={0,1/3,3/4,1};

xaxis3("\$x\$",0,1,red,OutTicks(myxchoice));
yaxis3("\$y\$",0,1,red,OutTicks(2,2));
zaxis3("\$z\$",1,30,red,OutTicks(beginlabel=false));
``````

It is the same with graph (2D).

• Excellent. I had tried things like OutTicks((0,1/3,1)) and OutTicks({0,1/3,1}), but hadn't thought to predefine the array. Thanks Nov 14, 2014 at 14:32
• `OutTicks({0,1/3,3/4,1})` does not work, but `xaxis3("\$x\$",0,1,red,OutTicks(new real[]{0,1/3,3/4,1}))` works. It is the behavior of Asymptote.
– O.G.
Nov 14, 2014 at 20:51