TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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 include a plot of tan(x) in some student notes.

Here is my input (using ConTeXt):



    \draw[-angle 60] (-9,0) -- (14,0) node[right] {$x$};
    \draw[-angle 60] (0,-6) -- (0,6) node[above] {$y$};
    \foreach \r in
             \draw[domain=\r-1.4:\r+1.4,line width=2pt] plot[samples=100]
             (\x,{tan(\x r)});
    \foreach \r in
              \draw[dashed] (\r,-6) -- (\r,6);    


And here is the output:

enter image description here

Can anybody shed some light on this strange output?

share|improve this question

closed as too localized by lockstep, percusse, Paulo Cereda, egreg, Marco Daniel Jan 6 '12 at 23:21

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

The output is fine in normal LaTeX. So it seems ConTeXt related. – Roelof Spijker Dec 16 '11 at 9:36
Since tikz uses the same math engine for both LaTeX and ConTeXt, I doubt that this is merely related to ConTeXt. Perhaps it is some bug in the tikz version shipped with ConTeXt - one that does not occur in the version used by whlt3? – Christian Feuersänger Dec 16 '11 at 9:41
This produces the correct output for me on TL 2011, with ConTeXt but it produces a bunch of pgfmath errors in the console output: lots of 'function already exists' errors. So you need to check versions of pgf. – Alan Munn Dec 16 '11 at 14:50

Browse other questions tagged or ask your own question.