TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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);

// code supplémentaire

share|improve this question

migrated from stackoverflow.com Jan 31 '13 at 23:11

This question came from our site for professional and enthusiast programmers.

up vote 1 down vote accepted

Ok I find the solution:


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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