Mathematica Stack Exchange is a question and answer site for users of Mathematica. 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

Is there an easy way to make BoxWhiskerChart show both the outliers and the median line? g1 below shows outliers but not the median line, and g2 shows the median line but not the outliers.

data = RandomReal[NormalDistribution[0, 1], 100];
g1 = BoxWhiskerChart[data, "Outliers"]
g2 = BoxWhiskerChart[data]

That is, can BoxWhiskerChart make a boxplot in the style of BoxWhiskerPlot?

data = RandomVariate[StudentTDistribution[5], 100];
BoxWhiskerPlot[data, BoxOutliers -> Automatic]


share|improve this question

If you read the Details & Options section in the documentation for BoxWhiskerChart you will find that there are presets but also the ability to control each element. If you want both outliers and a median marker you could do something like the following.

     RandomVariate[NormalDistribution[0, 1], 10]~
      Join~{5}, {{"Outliers", "o"}, {"MedianMarker", Automatic}}]

enter image description here

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.