How do you create a box plot without a complete dataset?

Hi all!

I’m a beginner at Mathematica and I’ve been trying to create some data visualizations for a school assignment. In particular, I want to make a box-and-whisker plot, however, the tutorial I found (here → BoxWhiskerPlot—Wolfram Documentation) only uses an example with a dataset of randomly generated numbers. With the data I am given, I only have the minimum, first quartile, median, third quartile, and maximum, and not the entire dataset, so how can I use only those to create my graphic?

Thank you!

You can make a sample that has precisely those quantiles:

With[{min = 0, fq = 5/4, md = 4, tq = 5, max = 9},
 BoxWhiskerChart[{min, fq, fq, md, tq, tq, max}]]

Thank you!

What if I wanted to combine both in a single plot? I tried

data 1 = With[{min = 0, fq = 5/4, md = 4, tq = 5, max = 9},
 BoxWhiskerChart[{min, fq, fq, md, tq, tq, max}]] 
data 2 = With[{min = 2, fq = 3, md = 10, tq = 11, max = 18},
 BoxWhiskerChart[{min, fq, fq, md, tq, tq, max}]]
BoxWhiskerPlot[data1, data2] 

But it didn’t work. Any help would be appreciated!

Remove the space in data 1 and data 2. Also, the data are a list, not a chart:

data1 = With[{min = 0, fq = 5/4, md = 4, tq = 5, max = 9},
   {min, fq, md, md, tq, max}];
data2 = With[{min = 2, fq = 3, md = 10, tq = 11, max = 18},
   {min, fq, md, md, tq, max}];
BoxWhiskerChart[{data1, data2}]

Thank you again for your help! This is great :slight_smile: