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 was trying to reproduce an example saw in the manual of PGFPLOTS v1.9:






boxplot prepared={
lower whisker=42, lower quartile=45,
upper quartile=47.5, upper whisker=48,
draw relative anchor=0.5, }, ]
table[row sep=\\,y index=0] { 40\\ 34\\ 56\\ };

However I'm getting the following error:

Package pgfkeys Error: I do not know the key '/tikz/boxplot prepared' 

I updated texlive today and my log says

Package: tikz 2010/10/13 v2.10

Is the code too old for my version?

share|improve this question
Add \usetikzlibrary{pgfplots.statistics} to your preamble. – Ignasi Feb 19 '14 at 20:09
@Ignasi Thank you, I try – HAL9000 Feb 19 '14 at 20:33
@Ignasi good, it works. Actually the manual reported it but it was not very clear, in my opinion. – HAL9000 Feb 19 '14 at 20:38
up vote 7 down vote accepted

Box Plots is a subsection of Statistics section in pgfplots documentation. Therefore you need to include


to your preamble to draw Box Plots or Histograms.

Not related with your question but your preamble:

  • includes \usepackage{caption} twice.
  • includes \usepackage{tikz} which is already loaded by pgfplots.
  • tikz, tcolorbox and pgfplots load xcolor which provides more facilities than color.
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.