You have full access to this article via your institution.
To the Editor
In biomedical research, it is often necessary to compare multiple data sets with different distributions. The bar plot, or histogram, is typically used to compare data sets on the basis of simple statistical measures, usually the mean with s.d. or s.e.m. However, summary statistics alone may fail to convey underlying differences in the structure of the primary data (Fig. 1a), which may in turn lead to erroneous conclusions. The box plot, also known as the box-and-whisker plot, represents both the summary statistics and the distribution of the primary data. The box plot thus enables visualization of the minimum, lower quartile, median, upper quartile and maximum of any data set (Fig. 1b). The first documented description of a box plot–like graph by Spear1 defined a range bar to show the median and interquartile range (IQR, or middle 50%) of a data set, with whiskers extended to minimum and maximum values. The most common implementation of the box plot, as defined by Tukey2, has a box that represents the IQR, with whiskers that extend 1.5 times the IQR from the box edges; it also allows for identification of outliers in the data set. Whiskers can also be defined to span the 95% central range of the data3. Other variations, including bean plots4 and violin plots, reveal additional details of the data distribution. These latter variants are less statistically informative but allow better visualization of the data distribution, such as bimodality (Fig. 1b), that may be hidden in a standard box plot.
Despite the obvious advantages of the box plot for simultaneous representation of data set and statistical parameters, this method is not in common use, in part because few available software tools allow the facile generation of box plots. For example, the standard spreadsheet tool Excel is unable to generate box plots. Here we describe an open-source application, called BoxPlotR, and an associated web portal that allow rapid generation of customized box plots. A user-defined data matrix is uploaded as a file or pasted directly into the application to generate a basic box plot with options for additional features. Sample size may be represented by the width of each box in proportion to the square root of the number of observations5. Whiskers may be defined according to the criteria of Spear1, Tukey2 or Altman3. The underlying data distribution may be visualized as a violin or bean plot or, alternatively, the actual data may be displayed as overlapping or nonoverlapping points. The 95% confidence interval that two medians are different may be illustrated as notches defined as ±(1.58 × IQR/√n) (ref. 5). There is also an option to plot the sample means and their confidence intervals. More complex statistical comparisons may be required to ascertain significance according to the specific experimental design6. The output plots may be labeled; customized by color, dimensions and orientation; and exported as publication-quality .eps, .pdf or .svg files. To help ensure that generated plots are accurately described in publications, the application generates a description of the plot for incorporation into a figure legend.
The interactive web application is written in R (ref. 7) with the R packages shiny, beanplot4, vioplot, beeswarm and RColorBrewer, and it is hosted on a shiny server to allow for interactive data analysis. User data are held only temporarily and discarded as soon as the session terminates. BoxPlotR is available at http://boxplot.tyerslab.com/ and may be downloaded to run locally or as a virtual machine for VMware and VirtualBox.
Author contributions
M.S. and J.W. conceived of the box plot tool, and M.S. developed the tool with input from all authors; J.W. implemented the server architecture; M.S., J.W., J.R. and M.T. wrote the manuscript.
References
Spear, M.E. Charting Statistics (McGraw-Hill, 1952).
Tukey, J.W. Exploratory Data Analysis (Addison-Wesley, 1977).
Altman, D.G. Practical Statistics for Medical Research (Chapman and Hall, 1991).
Kampstra, P. J. Stat. Softw. 28, c01 (2008).
McGill, R., Tukey, J.W. & Larsen, W.A. Am. Stat. 32, 12–16 (1978).
Nieuwenhuis, S., Forstmann, B.U. & Wagenmakers, E.J. Nat. Neurosci. 14, 1105–1107 (2011).
Ihaka, R. & Gentleman, R. J. Comput. Graph. Stat. 5, 299–314 (1996).
Acknowledgements
This work was supported by the Wellcome Trust through a Senior Research Fellowship to J.R. (084229), a core grant to the Wellcome Trust Centre for Cell Biology (092076), a European Research Council grant (233457) to M.T., a Genome Québec International Recruitment Award to M.T. and a Canada Research Chair in Systems and Synthetic Biology to M.T.
Author information
Authors and Affiliations
Corresponding authors
Ethics declarations
Competing interests
The authors declare no competing financial interests.
Rights and permissions
About this article
Cite this article
Spitzer, M., Wildenhain, J., Rappsilber, J. et al. BoxPlotR: a web tool for generation of box plots. Nat Methods 11, 121–122 (2014). https://doi.org/10.1038/nmeth.2811
Published:
Issue Date:
DOI: https://doi.org/10.1038/nmeth.2811
This article is cited by
-
A quantitative and site-specific atlas of the citrullinome reveals widespread existence of citrullination and insights into PADI4 substrates
Nature Structural & Molecular Biology (2024)
-
Counter-on-chip for bacterial cell quantification, growth, and live-dead estimations
Scientific Reports (2024)
-
Enhanced stress resilience in potato by deletion of Parakletos
Nature Communications (2024)
-
Fusarium euwallaceae, symbiont of the paninvasive polyphagous shot hole borer, is pathogenic to cultivated but not wild olive trees in South Africa
Journal of Plant Pathology (2024)
-
Orthopaedic knee scooter-related injury: prevalence and patient safety perception in a prospective cohort with exploratory risk factor analysis
Journal of Orthopaedic Surgery and Research (2023)