I need to do a boxplot (in Python and matplotlib) but I do not have the original \"raw\" data. What I have are precalculated values for max, min, mean, median and IQR (norma
Referring to the answer of @MKroehnert and Boxplot drawer function at https://matplotlib.org/gallery/statistics/bxp.html, the following could be helpful:
import matplotlib.pyplot as plt
stats = [{
"label": 'A', # not required
"mean": 5, # not required
"med": 5.5,
"q1": 3.5,
"q3": 7.5,
# "cilo": 5.3 # not required
# "cihi": 5.7 # not required
"whislo": 2.0, # required
"whishi": 8.0, # required
"fliers": [] # required if showfliers=True
}]
fs = 10 # fontsize
fig, axes = plt.subplots(nrows=1, ncols=1, figsize=(6, 6), sharey=True)
axes.bxp(stats)
axes.set_title('Boxplot for precalculated statistics', fontsize=fs)
plt.show()