# Possible to draw Boxplot using quartiles only?

Sorry about the informality but I am posting from my phone here.

Is it possible to draw/sketch a boxplot only using the values of quartiles? For example, minimum is 1, max is 10 lower quartile is 2 and upper quartile is 6, with median 4.

• If the background color is white: BoxWhiskerChart[ RandomVariate[NormalDistribution[0, 1], 100], {"Basic", {"Whiskers", White}}]. – JimB Sep 25 '18 at 20:51
• Or is your question "How do I estimate the minimum and maximum given the 3 quartiles?" – JimB Sep 25 '18 at 21:06
• BoxWhiskerChart[{ 1, 2, 4, 6, 10 }]? – kglr Sep 25 '18 at 21:19

The "BoxRange" method option to BoxWhiskerChart provides a few ways of computing the key statistics for drawing the box-whisker chart. In the most general form, when given a function f, it applies f to the data to compute the min, max, median, and quartiles. By using the identity function, you can just pass in the precomputed values as the data to BoxWhiskerChart and use them instead of the normal calculations.

BoxWhiskerChart[{1, 2, 4, 6, 10}, Method -> {"BoxRange" -> (# &)}]

• Neat trick! BoxWhiskerChart[{1, 2, 4, 6, 10}, Method -> {"BoxRange" -> Identity}] also works of course. – J. M.'s ennui Sep 26 '18 at 3:08
• Yeah, I thought of that when I wrote "identity function", but felt that in this case #& was more illustrative, since it's clearer that something is being passed in as opposed to being a special value. And it's a feature, not a trick. :-) – Brett Champion Sep 26 '18 at 3:13
• in version 9, BoxWhiskerChart[{1, 2, 4, 6, 10}] , BoxWhiskerChart[{1, 2, 4, 6, 10}, Method -> {"BoxRange" -> (#&)}], BoxWhiskerChart[{1, 2, 4, 6, 10}, Method -> {"BoxRange" -> Quartiles}] all give the same output. – kglr Sep 26 '18 at 3:28
• On a related note, I don't see any option to put it to horizontal?? I can't find it anywhere. – Chen Stats Yu Sep 28 '18 at 21:23
• BarOrigin -> Left? – Brett Champion Sep 29 '18 at 1:36