# Asymptote draw a vertical line (x-axis)

I'm trying to get a very simple plot by plotting:

• y=3
• y=2x
• x=3

I have no problem to plot y=3 and y=2x

However, how do I plot x=3?

I use this code:

``````usepackage("amsmath,amssymb"); usepackage("inputenc","utf8"); // code
figure import graph; unitsize(1cm,1cm); xlimits(0,10); ylimits(0,10);
real F(real x) {return 3;}
draw(graph(F,0,10,n=400),linewidth(1pt)+black+solid); real G(real x)
{return 2x;} draw(graph(G,0,10,n=400),linewidth(1pt)+black+solid);
xlimits(0,10,Crop); ylimits(0,10,Crop);

xaxis(axis=YEquals(0),xmin=0,xmax=10,Ticks(scale(.7)*Label(),beginlabel=true,endlabel=true,begin=true,end=true,Step=1,Size=1mm),p=linewidth(1pt)+black,Arrow(2mm),true);
yaxis(axis=XEquals(0),ymin=0,ymax=10,Ticks(scale(.7)*Label(),beginlabel=true,endlabel=true,begin=true,end=true,Step=1,Size=1mm),p=linewidth(1pt)+black,Arrow(2mm),true);

shipout(bbox(0.1cm,0.1cm,white));
``````

Ok I find the solution:

draw((15,0)--(15,55),linewidth(1pt)+black+solid);