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?

  • 2
    Add \usetikzlibrary{pgfplots.statistics} to your preamble. – Ignasi Feb 19 '14 at 20:09
  • @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

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.