This application was developed with Nature Methods and you can find the publication here. The BoxPlotR has also been mentioned in this editorial and this blog entry. Nature methods also dedicated a Points of View and a Points of Significance column to box plots. We hope that you find the BoxPlotR useful and we welcome suggestions for additional features by our users.
Support BoxPlotR
Please consider supporting the development and maintenance of BoxPlotR with a donation.
Software references
R Development Core Team. R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna (2013)
RStudio and Inc. shiny: Web Application Framework for R. R package version 0.5.0 (2013)
Adler, D. vioplot: Violin plot. R package version 0.2 (2005)
Eklund, A. beeswarm: The bee swarm plot, an alternative to stripchart. R package version 0.1.5 (2012)
Kampstra, P. Beanplot: A Boxplot Alternative for Visual Comparison of Distributions. Journal of Statistical Software, Code Snippets 28(1). 1-9 (2008)
Neuwirth, E. RColorBrewer: ColorBrewer palettes. R package version 1.0-5. (2011)
This application was created by the Tyers and Rappsilber labs. Please send bugs and feature requests to Michaela Spitzer (michaela.spitzer(at)gmail.com) and Jan Wildenhain (jan.wildenhain(at)gmail.com). This application uses the shiny package from RStudio.
This application was created by the Tyers and Rappsilber labs.
Box plot statistics
This application was created by the Tyers and Rappsilber labs.
Box plot description for figure legend:
Further information to be added to the figure legend:
What do the box plots show, explain colours if used.
Download box plot data as .CSV fileThis application was created by the Tyers and Rappsilber labs.
August 11, 2026
MCP output delivery update: The BoxPlotR MCP server now returns generated plot files directly in the JSON-RPC tool response, while still saving the file to output_path. PNG and SVG outputs are returned as MCP image content, and PDF outputs are returned as MCP resource content with a base64 payload. This makes BoxPlotR easier to use from AI assistants because the generated figure can be displayed inline without separately retrieving the saved file.
May 30, 2026
Introduced support for the Modern (ggplot2) rendering engine! Users can now seamlessly toggle between Classic (Base R) and Modern (ggplot2) plot rendering. Implemented stunning ggplot2 box plots, violin plots, and bean plots with real-time customized fill colors, alpha levels, jittered raw data point overlays, red sample means, and error bars showing confidence intervals.
May 29, 2026
Upgraded the application environment and Docker container configurations to fully support the latest R version 4.6.0 and Shiny version 1.13.0, ensuring long-term compatibility, stability, and security. In addition, the application's user interface has been fully modernized with a premium glassmorphic theme, responsive page layouts, customized form controls, and improved plot statistics tables.
April 16, 2026
Number of sessions increased to 50.
April 8, 2026
The shiny server backend has been updated. The number of concurrent sessions has been limited to 15 and the session idle timeout set to 10 minutes. We are currently reworking the code to support the latest R and shiny versions.
January 17, 2021
There are several recent updates. The jitter of points is now consistent for all samples. When data points are added to the plot, the size can now be modified with sliders.
Q: I have trouble editing the graphic files.
A: For EPS files make sure to 'ungroup' all objects so they can be edited independently. In Adobe Illustrator you will also need to use the 'release compound path' command.
Q: How do I install Docker, clone BoxPlotR from GitHub, and run it in a container?
A: Here is the step-by-step guide to installing Docker, pulling the repository from GitHub, and running BoxPlotR inside a container:
- Install Docker:
- Windows / macOS: Download and install Docker Desktop.
- Linux (Ubuntu/Debian): Run these terminal commands to install and start Docker:
sudo apt-get update sudo apt-get install -y docker.io sudo systemctl start docker sudo systemctl enable docker
- Clone the Repository from GitHub:
git clone https://github.com/jwildenhain/BoxPlotR.shiny.git cd BoxPlotR.shiny - Build the pre-configured Docker image:
docker build -t boxplotr . - Run the container:
docker run -d -p 3838:3838 --name boxplotr-app boxplotrNow you can open
http://localhost:3838in your browser to run the full glassmorphic web app!
Q: Does BoxPlotR support integration with AI coding assistants (e.g. Claude Desktop, Cursor, Antigravity)?
A: Yes! BoxPlotR includes a pre-configured Model Context Protocol (MCP) server (boxplotr_mcp_server.py). This enables AI assistants to programmatically generate and customize high-quality box plots, violin plots, and bean plots using both R engines directly through automated tools. It works over standard I/O (stdio) and returns the generated figure inside the MCP response as well as writing it to output_path.
Q: Which MCP output formats are supported, and what does the tool return?
A: Set the requested format by changing the file extension in output_path. Use .png for a raster image, .svg for an editable vector image, or .pdf for a publication-ready document. The MCP response includes a text summary plus the file payload: PNG and SVG are returned as MCP image content, while PDF is returned as MCP resource content with MIME type and base64 blob. The same file is also saved on disk at output_path for reproducibility.
Q: How can I make the MCP server available and run it inside a Docker container?
A: You can easily route MCP commands to run inside the active BoxPlotR Docker container. First, make sure the Dockerfile installs Python 3 (e.g., RUN apt-get update && apt-get install -y python3). Then, add the following configuration to your AI assistant's configuration file (e.g., claude_desktop_config.json) to execute the server via standard input/output redirection:
{
"mcpServers": {
"boxplotr-docker": {
"command": "docker",
"args": [
"exec",
"-i",
"boxplotr-container-name",
"python3",
"/srv/shiny-server/boxplotr_mcp_server.py"
]
}
}
}This maps standard stdio streams directly into the running R environment in the container without exposing ports!
Q: How can I test the MCP server locally with a JSON-RPC request?
A: You can test the stdio MCP server from your command line by piping a standard JSON-RPC 2.0 tools/call request directly into the Python script. Since the server operates over line-by-line stdio (readline()), the JSON-RPC request payload must be sent as a single line (no newlines within the JSON string itself). Here is a concrete JSON example using a wide-format dataset (where columns represent samples) to generate a ggplot2 box plot with the Economist style preset:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "generate_boxplot",
"arguments": {
"data_config": {
"values": "SampleA,SampleB\n12.5,8.9\n14.2,10.1\n15.8,11.5\n13.1,9.4"
},
"visualization": {
"plot_type": "boxplot",
"plot_engine": "ggplot2",
"style_guide": "economist",
"orientation": "vertical",
"log_scale": false
},
"styling": {
"title": "Comparison of Sample A and Sample B",
"xlab": "Group",
"ylab": "Value",
"colors": ["#0ea5e9", "#ef4444"],
"add_grid": "y"
},
"overlays": {
"show_points": true,
"point_type": "jittered",
"point_size": 1.2,
"point_transparency": 30,
"add_means": true,
"notch": true
},
"output_path": "/absolute/path/to/output_plot.png"
}
}
}Run the following command in your terminal (with the JSON payload minified onto a single line) to test execution:
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "generate_boxplot", "arguments": {"data_config": {"values": "SampleA,SampleB\n12.5,8.9\n14.2,10.1\n15.8,11.5\n13.1,9.4"}, "visualization": {"plot_type": "boxplot", "plot_engine": "ggplot2", "style_guide": "economist", "orientation": "vertical", "log_scale": false}, "styling": {"title": "Comparison of Sample A and Sample B", "xlab": "Group", "ylab": "Value", "colors": ["#0ea5e9", "#ef4444"], "add_grid": "y"}, "overlays": {"show_points": true, "point_type": "jittered", "point_size": 1.2, "point_transparency": 30, "add_means": true, "notch": true}, "output_path": "assets/mcp_test_plot.png"}}}' | python3 boxplotr_mcp_server.pyThis command runs the Python server, triggers the R script dynamically, and outputs a JSON-RPC response with two content items: a text summary and the generated plot image payload. For PNG output, the second content item has type: image and mimeType: image/png. You can change assets/mcp_test_plot.png to assets/mcp_test_plot.svg or assets/mcp_test_plot.pdf to test vector outputs.