3

In pgfplots, if you want error bars, you have to write error bars/.cd into each addplot that should have error bars. What does it mean and what does it do and why do I need it?

1 Answer 1

5

cd means change directory.

This command will prefix all successive keys by the key "error bars/" automatically

Edit: Why do you need it? I do not have the time to check the code, but I suppose that drawing an error bar needs to do something a little different than drawing a normal plot. So it probably needs to redefine some keys or functions.

For example:

\addplot[mark=o]

will use the key mark (probably /pgfplots/mark)

But

\addplot[error bars/.cd,mark=o]

will use the key error bars/mark (probably /pgfplots/error bars/mark), that may have a totally different meaning, adapted to plot a graph with error bars...

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .