# pgfplot gives an error despite using the latest version v1.7 [closed]

I keep getting this error every time I compile using the pgfplot package

"! Package pgfkeys Error: I do not know the key '/pgfplots/error bars/ .cd' and I am going to ignore it. Perhaps you misspelled it."

I am using the latest version of pgfplot v1.7

Firstly I am a complete novice to Latex. So I am not sure what a "MWE" is and setting up the problem is extremely challenging in itself. But I will try my best to pose the problem. Secondly, please note that the code given below is NOT at all complete and simply copy-pasting it might not work. I just want to show the bare necessities. Thirdly, if the experts require more information, let me know and I will do my best to fill in the blanks.

### Code:

\documentclass[%
12pt,
oneside,
]{report}
%Packages used
\usepackage{graphicx}
\usepackage{makeidx}
\usepackage{amssymb, amsmath}
\usepackage[]{hyperref}
\usepackage[greek,english]{babel}
\usepackage[font=small,format=plain,labelfont=bf,up,textfont=it,up]{caption} % Figure captions
\setlength{\parskip}{\baselineskip}
\usepackage{pgfplots} %Uses pgfplots packages to make plots inside LATEX environment

\begin{document}
\chapter{section}
\markright{section}
%==================================================================
\section{calculations}
%==================================================================
\begin{figure}
\centering
\begin{tikzpicture}
\begin{axis}[
xlabel = xxx
ylabel = yyy
]
\addplot [red, only marks, error bars/.cd, y dir=both,y explicit]
coordinates {
(1,1)+-(0,0.2)
(2,2)+-(0,0.2)
(3,3)+-(0,0.1)
};
\end{axis}
\end{tikzpicture}
\end{figure}
\end{document}


### Error:

"! Package pgfkeys Error: I do not know the key '/pgfplots/error bars/ .cd' and I am going to ignore it. Perhaps you misspelled it."

### Solution:

Change error bars/.cd to error bars

### Reason:

I think its because the program cannot find the correct directory path. But I am not sure so don't take my word on it.

-

## closed as too localized by Joseph Wright♦Nov 22 '12 at 8:03

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.SE. It would be helpful if you composed a fully compilable MWE including \documentclass and the appropriate packages that sets up the problem. While solving problems is fun, setting them up is not. Then those trying to help can simply cut and paste your MWE and get started on solving problem. –  Peter Grill Nov 16 '12 at 20:41
Your absolutely correct Peter. I am new to Latex and I apologize for that. –  Charles Nov 17 '12 at 0:08
However, I managed to solve my own problem. So sorry for the trouble guys and thank you for your prompt response Peter. Have a good one! –  Charles Nov 17 '12 at 0:09
If you had the a problem it is very likely that someone else will encounter the same problem in the future. It would be helpful if you posted an answer explaining what the problem was and how you corrected it. Self answers are perfectly acceptable, and even encouraged –  Peter Grill Nov 17 '12 at 0:11
I get no error with your code. At the same time, I see there is a space between the slash and the dot in I do not know the key '/pgfplots/error bars/ .cd' . If I add a space there, I get your error too. Maybe this was the problem. –  Luigi Nov 20 '12 at 8:21