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 got following error in my computer only.

Undefined control sequence.
\pgfplots@already@computed@legend@node ..._{\text 
l.261 \end{axis} 

here is the code


scale only axis,
xmin=0, xmax=20,
xlabel={Time (s)},
ymin=-10, ymax=10,
ylabel={Angle (deg)},
legend style={draw=black,fill=white,legend cell align=left}
\addplot [
line width=1.0pt
0 -5
20 -5
share|improve this question

closed as too localized by percusse, Werner, Speravir, Thorsten, Stefan Kottwitz Apr 21 '13 at 6:40

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.

Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. What is your preamble? Which packages do you load? In which order? By the way, you can use Ctrl+K or the { } button to format code as a code block. Using ` works for inline code. – Qrrbrbirlbel Mar 31 '13 at 0:59
The undefined command is the last one on the first line of the message which is \text that is defined in the amsmath (and amstext) package. – David Carlisle Mar 31 '13 at 1:03
I think you are on MikTeX and updated it. So this might have happened. tex.stackexchange.com/q/96778/3235 – percusse Mar 31 '13 at 12:06
Thank you all for your suggestions. I think problem is with amsmath. I have not checked whether my miktex contains, latest version of amsmath – Ansu Mar 31 '13 at 12:54