Boxplot with significance brackets

Boxplot graphs, also known as box and whisker plots, offer a compelling way to visually display the distribution and summary statistics of a dataset. They present key descriptive statistics such as median, quartiles, and potential outliers, making them ideal for comparing data across different groups or identifying unusual data points. Understanding boxplot graphs is essential for data analysis. These graphs quickly reveal central tendency, spread, and skewness, providing valuable insights for decision-making. Their effectiveness in visualizing data makes them a staple in various fields, from finance and healthcare to engineering and social sciences.


Economist GGPlot Excel Paul Tol Black And White Solarized Stata Tableau Wall Street CanvasXpress
<html>

  <head>
    <!-- Include the CanvasXpress library in your HTML file -->
    <link rel="stylesheet" href="https://www.canvasxpress.org/dist/canvasXpress.css" type="text/css"/>
    <script src="https://www.canvasxpress.org/dist/canvasXpress.min.js"></script>
  </head>

  <body>

    <!-- Create a canvas element for the chart with the desired dimensions -->
    <div>
      <canvas id="canvasId" width="600" height="600"></canvas>
    </div>


    <!-- Create a script to initialize the chart -->
    <script>

      // Use a data frame (2D-array) for the graph
      var data = 

      // Create the configuration for the graph
      var config = {
        "graphType": "Boxplot",
        "groupingFactors": [
          [
            "group"
          ]
        ],
        "title": "Tooth growth by dose with pairwise significance (Welch t-test, BH-adjusted)",
        "xAxisTitle": "value",
        "smpTitle": "group",
        "showBoxplotIfViolin": true,
        "showStatInference": true,
        "statInference": {
          "correction": {
            "method": "BH",
            "scope": "panel"
          },
          "annotate": "stars",
          "comparisons": [
            {
              "groups": [
                "Control",
                "DoseA"
              ],
              "p": 0.00258746
            },
            {
              "groups": [
                "Control",
                "DoseB"
              ],
              "p": 4.7e-07
            },
            {
              "groups": [
                "DoseA",
                "DoseB"
              ],
              "p": 0.00116248
            },
            {
              "groups": [
                "Control",
                "DoseC"
              ],
              "p": 0.53069114
            }
          ]
        },
        "graphOrientation": "vertical"
      }

      // Event used to create graph (optional)
      var events = false

      // Call the CanvasXpress function to create the graph
      var cX = new CanvasXpress("canvasId", data, config, events);

    </script>

  </body>

</html>
<html>

  <head>
    <!-- Include the CanvasXpress library in your HTML file -->
    <link rel="stylesheet" href="https://www.canvasxpress.org/dist/canvasXpress.css" type="text/css"/>
    <script src="https://www.canvasxpress.org/dist/canvasXpress.min.js"></script>
  </head>

  <body>

    <!-- Create a canvas element for the chart with the desired dimensions -->
    <div>
      <canvas id="canvasId" width="600" height="600"></canvas>
    </div>


    <!-- Create a script to initialize the chart -->
    <script>

      // Create the data for the graph
      var data = {
         "y" : {
            "vars" : [
               [
                  "value"
               ]
            ],
            "smps" : [
               [
                  "Obs1"
               ],
               [
                  "Obs2"
               ],
               [
                  "Obs3"
               ],
               [
                  "Obs4"
               ],
               [
                  "Obs5"
               ],
               [
                  "Obs6"
               ],
               [
                  "Obs7"
               ],
               [
                  "Obs8"
               ],
               [
                  "Obs9"
               ],
               [
                  "Obs10"
               ],
               [
                  "Obs11"
               ],
               [
                  "Obs12"
               ],
               [
                  "Obs13"
               ],
               [
                  "Obs14"
               ],
               [
                  "Obs15"
               ],
               [
                  "Obs16"
               ],
               [
                  "Obs17"
               ],
               [
                  "Obs18"
               ],
               [
                  "Obs19"
               ],
               [
                  "Obs20"
               ],
               [
                  "Obs21"
               ],
               [
                  "Obs22"
               ],
               [
                  "Obs23"
               ],
               [
                  "Obs24"
               ],
               [
                  "Obs25"
               ],
               [
                  "Obs26"
               ],
               [
                  "Obs27"
               ],
               [
                  "Obs28"
               ],
               [
                  "Obs29"
               ],
               [
                  "Obs30"
               ],
               [
                  "Obs31"
               ],
               [
                  "Obs32"
               ],
               [
                  "Obs33"
               ],
               [
                  "Obs34"
               ],
               [
                  "Obs35"
               ],
               [
                  "Obs36"
               ],
               [
                  "Obs37"
               ],
               [
                  "Obs38"
               ],
               [
                  "Obs39"
               ],
               [
                  "Obs40"
               ],
               [
                  "Obs41"
               ],
               [
                  "Obs42"
               ],
               [
                  "Obs43"
               ],
               [
                  "Obs44"
               ],
               [
                  "Obs45"
               ],
               [
                  "Obs46"
               ],
               [
                  "Obs47"
               ],
               [
                  "Obs48"
               ],
               [
                  "Obs49"
               ],
               [
                  "Obs50"
               ],
               [
                  "Obs51"
               ],
               [
                  "Obs52"
               ],
               [
                  "Obs53"
               ],
               [
                  "Obs54"
               ],
               [
                  "Obs55"
               ],
               [
                  "Obs56"
               ],
               [
                  "Obs57"
               ],
               [
                  "Obs58"
               ],
               [
                  "Obs59"
               ],
               [
                  "Obs60"
               ],
               [
                  "Obs61"
               ],
               [
                  "Obs62"
               ],
               [
                  "Obs63"
               ],
               [
                  "Obs64"
               ],
               [
                  "Obs65"
               ],
               [
                  "Obs66"
               ],
               [
                  "Obs67"
               ],
               [
                  "Obs68"
               ],
               [
                  "Obs69"
               ],
               [
                  "Obs70"
               ],
               [
                  "Obs71"
               ],
               [
                  "Obs72"
               ],
               [
                  "Obs73"
               ],
               [
                  "Obs74"
               ],
               [
                  "Obs75"
               ],
               [
                  "Obs76"
               ],
               [
                  "Obs77"
               ],
               [
                  "Obs78"
               ],
               [
                  "Obs79"
               ],
               [
                  "Obs80"
               ],
               [
                  "Obs81"
               ],
               [
                  "Obs82"
               ],
               [
                  "Obs83"
               ],
               [
                  "Obs84"
               ],
               [
                  "Obs85"
               ],
               [
                  "Obs86"
               ],
               [
                  "Obs87"
               ],
               [
                  "Obs88"
               ],
               [
                  "Obs89"
               ],
               [
                  "Obs90"
               ]
            ],
            "data" : [
               [
                  [
                     4.311
                  ],
                  [
                     5.202
                  ],
                  [
                     4.081
                  ],
                  [
                     6.755
                  ],
                  [
                     5.362
                  ],
                  [
                     4.097
                  ],
                  [
                     5.536
                  ],
                  [
                     5.812
                  ],
                  [
                     5.633
                  ],
                  [
                     4.664
                  ],
                  [
                     6.663
                  ],
                  [
                     5.429
                  ],
                  [
                     4.317
                  ],
                  [
                     2.564
                  ],
                  [
                     6.237
                  ],
                  [
                     4.951
                  ],
                  [
                     4.982
                  ],
                  [
                     6.038
                  ],
                  [
                     5.903
                  ],
                  [
                     5.653
                  ],
                  [
                     6.011
                  ],
                  [
                     5.86
                  ],
                  [
                     5.082
                  ],
                  [
                     2.812
                  ],
                  [
                     6.844
                  ],
                  [
                     6.033
                  ],
                  [
                     5.913
                  ],
                  [
                     4.335
                  ],
                  [
                     5.526
                  ],
                  [
                     6.602
                  ],
                  [
                     7.73
                  ],
                  [
                     5.977
                  ],
                  [
                     6.565
                  ],
                  [
                     6.035
                  ],
                  [
                     4.448
                  ],
                  [
                     5.602
                  ],
                  [
                     5.627
                  ],
                  [
                     6.029
                  ],
                  [
                     7.42
                  ],
                  [
                     7.016
                  ],
                  [
                     5.903
                  ],
                  [
                     5.796
                  ],
                  [
                     6.936
                  ],
                  [
                     6.768
                  ],
                  [
                     5.273
                  ],
                  [
                     5.251
                  ],
                  [
                     7.374
                  ],
                  [
                     7.899
                  ],
                  [
                     6.754
                  ],
                  [
                     8.045
                  ],
                  [
                     7.418
                  ],
                  [
                     6.104
                  ],
                  [
                     7.343
                  ],
                  [
                     5.432
                  ],
                  [
                     8.763
                  ],
                  [
                     9.475
                  ],
                  [
                     6.423
                  ],
                  [
                     5.543
                  ],
                  [
                     7.641
                  ],
                  [
                     6.724
                  ],
                  [
                     10.022
                  ],
                  [
                     6.849
                  ],
                  [
                     7.797
                  ],
                  [
                     6.936
                  ],
                  [
                     5.934
                  ],
                  [
                     7.145
                  ],
                  [
                     4.554
                  ],
                  [
                     8.805
                  ],
                  [
                     7.099
                  ],
                  [
                     7.473
                  ],
                  [
                     5.776
                  ],
                  [
                     4.59
                  ],
                  [
                     5.911
                  ],
                  [
                     4.366
                  ],
                  [
                     4.046
                  ],
                  [
                     5.591
                  ],
                  [
                     4.857
                  ],
                  [
                     5.301
                  ],
                  [
                     5.374
                  ],
                  [
                     4.71
                  ],
                  [
                     4.731
                  ],
                  [
                     5.165
                  ],
                  [
                     6.478
                  ],
                  [
                     3.776
                  ],
                  [
                     5.894
                  ],
                  [
                     5.633
                  ],
                  [
                     6.363
                  ],
                  [
                     4.996
                  ],
                  [
                     5.67
                  ],
                  [
                     5.567
                  ]
               ]
            ]
         },
         "x" : {
            "group" : [
               [
                  "Control"
               ],
               [
                  "Control"
               ],
               [
                  "Control"
               ],
               [
                  "Control"
               ],
               [
                  "Control"
               ],
               [
                  "Control"
               ],
               [
                  "Control"
               ],
               [
                  "Control"
               ],
               [
                  "Control"
               ],
               [
                  "Control"
               ],
               [
                  "Control"
               ],
               [
                  "Control"
               ],
               [
                  "Control"
               ],
               [
                  "Control"
               ],
               [
                  "Control"
               ],
               [
                  "Control"
               ],
               [
                  "Control"
               ],
               [
                  "Control"
               ],
               [
                  "Control"
               ],
               [
                  "Control"
               ],
               [
                  "Control"
               ],
               [
                  "Control"
               ],
               [
                  "Control"
               ],
               [
                  "Control"
               ],
               [
                  "DoseA"
               ],
               [
                  "DoseA"
               ],
               [
                  "DoseA"
               ],
               [
                  "DoseA"
               ],
               [
                  "DoseA"
               ],
               [
                  "DoseA"
               ],
               [
                  "DoseA"
               ],
               [
                  "DoseA"
               ],
               [
                  "DoseA"
               ],
               [
                  "DoseA"
               ],
               [
                  "DoseA"
               ],
               [
                  "DoseA"
               ],
               [
                  "DoseA"
               ],
               [
                  "DoseA"
               ],
               [
                  "DoseA"
               ],
               [
                  "DoseA"
               ],
               [
                  "DoseA"
               ],
               [
                  "DoseA"
               ],
               [
                  "DoseA"
               ],
               [
                  "DoseA"
               ],
               [
                  "DoseA"
               ],
               [
                  "DoseA"
               ],
               [
                  "DoseB"
               ],
               [
                  "DoseB"
               ],
               [
                  "DoseB"
               ],
               [
                  "DoseB"
               ],
               [
                  "DoseB"
               ],
               [
                  "DoseB"
               ],
               [
                  "DoseB"
               ],
               [
                  "DoseB"
               ],
               [
                  "DoseB"
               ],
               [
                  "DoseB"
               ],
               [
                  "DoseB"
               ],
               [
                  "DoseB"
               ],
               [
                  "DoseB"
               ],
               [
                  "DoseB"
               ],
               [
                  "DoseB"
               ],
               [
                  "DoseB"
               ],
               [
                  "DoseB"
               ],
               [
                  "DoseB"
               ],
               [
                  "DoseB"
               ],
               [
                  "DoseB"
               ],
               [
                  "DoseB"
               ],
               [
                  "DoseB"
               ],
               [
                  "DoseB"
               ],
               [
                  "DoseC"
               ],
               [
                  "DoseC"
               ],
               [
                  "DoseC"
               ],
               [
                  "DoseC"
               ],
               [
                  "DoseC"
               ],
               [
                  "DoseC"
               ],
               [
                  "DoseC"
               ],
               [
                  "DoseC"
               ],
               [
                  "DoseC"
               ],
               [
                  "DoseC"
               ],
               [
                  "DoseC"
               ],
               [
                  "DoseC"
               ],
               [
                  "DoseC"
               ],
               [
                  "DoseC"
               ],
               [
                  "DoseC"
               ],
               [
                  "DoseC"
               ],
               [
                  "DoseC"
               ],
               [
                  "DoseC"
               ],
               [
                  "DoseC"
               ],
               [
                  "DoseC"
               ],
               [
                  "DoseC"
               ]
            ]
         }
      }

      // Create the configuration for the graph
      var config = {
        "graphType": "Boxplot",
        "groupingFactors": [
          [
            "group"
          ]
        ],
        "title": "Tooth growth by dose with pairwise significance (Welch t-test, BH-adjusted)",
        "xAxisTitle": "value",
        "smpTitle": "group",
        "showBoxplotIfViolin": true,
        "showStatInference": true,
        "statInference": {
          "correction": {
            "method": "BH",
            "scope": "panel"
          },
          "annotate": "stars",
          "comparisons": [
            {
              "groups": [
                "Control",
                "DoseA"
              ],
              "p": 0.00258746
            },
            {
              "groups": [
                "Control",
                "DoseB"
              ],
              "p": 4.7e-07
            },
            {
              "groups": [
                "DoseA",
                "DoseB"
              ],
              "p": 0.00116248
            },
            {
              "groups": [
                "Control",
                "DoseC"
              ],
              "p": 0.53069114
            }
          ]
        },
        "graphOrientation": "vertical"
      }

      // Event used to create graph (optional)
      var events = false

            // Call the CanvasXpress function to create the graph
      var cX = new CanvasXpress("canvasId", data, config, events);

    </script>

  </body>

</html>
library(canvasXpress)
y=read.table("https://www.canvasxpress.org/data/r/cX-boxplot25-dat.txt", header=TRUE, sep="\t", quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
x=read.table("https://www.canvasxpress.org/data/r/cX-boxplot25-smp.txt", header=TRUE, sep="\t", quote="", row.names=1, fill=TRUE, check.names=FALSE, stringsAsFactors=FALSE)
canvasXpress(
data=y,
smpAnnot=x,
graphOrientation="vertical",
graphType="Boxplot",
groupingFactors=list(list("group")),
showBoxplotIfViolin=TRUE,
showStatInference=TRUE,
smpTitle="group",
statInference=list(annotate="stars", comparisons=list(list(groups=list("Control", "DoseA"), p=0.00258746), list(groups=list("Control", "DoseB"), p=4.7e-07), list(groups=list("DoseA", "DoseB"), p=0.00116248), list(groups=list("Control", "DoseC"), p=0.53069114)), correction=list(method="BH", scope="panel")),
title="Tooth growth by dose with pairwise significance (Welch t-test, BH-adjusted)",
xAxisTitle="value"
)
from canvasxpress.canvas import CanvasXpress
from canvasxpress.plot import show_in_browser

if __name__ == "__main__":
  # Define the chart with its data and configuration
  chart: CanvasXpress = CanvasXpress(
    render_to = "boxplot25",
    data = {
      "y": {
        "vars": [
          ["value"]
        ],
        "smps": [
          ["Obs1"],
          ["Obs2"],
          ["Obs3"],
          ["Obs4"],
          ["Obs5"],
          ["Obs6"],
          ["Obs7"],
          ["Obs8"],
          ["Obs9"],
          ["Obs10"],
          ["Obs11"],
          ["Obs12"],
          ["Obs13"],
          ["Obs14"],
          ["Obs15"],
          ["Obs16"],
          ["Obs17"],
          ["Obs18"],
          ["Obs19"],
          ["Obs20"],
          ["Obs21"],
          ["Obs22"],
          ["Obs23"],
          ["Obs24"],
          ["Obs25"],
          ["Obs26"],
          ["Obs27"],
          ["Obs28"],
          ["Obs29"],
          ["Obs30"],
          ["Obs31"],
          ["Obs32"],
          ["Obs33"],
          ["Obs34"],
          ["Obs35"],
          ["Obs36"],
          ["Obs37"],
          ["Obs38"],
          ["Obs39"],
          ["Obs40"],
          ["Obs41"],
          ["Obs42"],
          ["Obs43"],
          ["Obs44"],
          ["Obs45"],
          ["Obs46"],
          ["Obs47"],
          ["Obs48"],
          ["Obs49"],
          ["Obs50"],
          ["Obs51"],
          ["Obs52"],
          ["Obs53"],
          ["Obs54"],
          ["Obs55"],
          ["Obs56"],
          ["Obs57"],
          ["Obs58"],
          ["Obs59"],
          ["Obs60"],
          ["Obs61"],
          ["Obs62"],
          ["Obs63"],
          ["Obs64"],
          ["Obs65"],
          ["Obs66"],
          ["Obs67"],
          ["Obs68"],
          ["Obs69"],
          ["Obs70"],
          ["Obs71"],
          ["Obs72"],
          ["Obs73"],
          ["Obs74"],
          ["Obs75"],
          ["Obs76"],
          ["Obs77"],
          ["Obs78"],
          ["Obs79"],
          ["Obs80"],
          ["Obs81"],
          ["Obs82"],
          ["Obs83"],
          ["Obs84"],
          ["Obs85"],
          ["Obs86"],
          ["Obs87"],
          ["Obs88"],
          ["Obs89"],
          ["Obs90"]
        ],
        "data": [
          [
            [4.311],
            [5.202],
            [4.081],
            [6.755],
            [5.362],
            [4.097],
            [5.536],
            [5.812],
            [5.633],
            [4.664],
            [6.663],
            [5.429],
            [4.317],
            [2.564],
            [6.237],
            [4.951],
            [4.982],
            [6.038],
            [5.903],
            [5.653],
            [6.011],
            [5.86],
            [5.082],
            [2.812],
            [6.844],
            [6.033],
            [5.913],
            [4.335],
            [5.526],
            [6.602],
            [7.73],
            [5.977],
            [6.565],
            [6.035],
            [4.448],
            [5.602],
            [5.627],
            [6.029],
            [7.42],
            [7.016],
            [5.903],
            [5.796],
            [6.936],
            [6.768],
            [5.273],
            [5.251],
            [7.374],
            [7.899],
            [6.754],
            [8.045],
            [7.418],
            [6.104],
            [7.343],
            [5.432],
            [8.763],
            [9.475],
            [6.423],
            [5.543],
            [7.641],
            [6.724],
            [10.022],
            [6.849],
            [7.797],
            [6.936],
            [5.934],
            [7.145],
            [4.554],
            [8.805],
            [7.099],
            [7.473],
            [5.776],
            [4.59],
            [5.911],
            [4.366],
            [4.046],
            [5.591],
            [4.857],
            [5.301],
            [5.374],
            [4.71],
            [4.731],
            [5.165],
            [6.478],
            [3.776],
            [5.894],
            [5.633],
            [6.363],
            [4.996],
            [5.67],
            [5.567]
          ]
        ]
      },
      "x": {
        "group": [
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"]
        ]
      }
    },
    config = {
      "graphType": "Boxplot",
      "groupingFactors": [
        ["group"]
      ],
      "title": "Tooth growth by dose with pairwise significance (Welch t-test, BH-adjusted)",
      "xAxisTitle": "value",
      "smpTitle": "group",
      "showBoxplotIfViolin": True,
      "showStatInference": True,
      "statInference": {
        "correction": {
          "method": "BH",
          "scope": "panel"
        },
        "annotate": "stars",
        "comparisons": [
          {
            "groups": ["Control", "DoseA"],
            "p": 0.00258746
          },
          {
            "groups": ["Control", "DoseB"],
            "p": 4.7e-07
          },
          {
            "groups": ["DoseA", "DoseB"],
            "p": 0.00116248
          },
          {
            "groups": ["Control", "DoseC"],
            "p": 0.53069114
          }
        ]
      },
      "graphOrientation": "vertical"
    },
    width = 600,
    height = 600
  )

  # Display the chart in its own Web page
  show_in_browser(chart)
Run this notebook: Open in Binder
from canvasxpress.canvas import CanvasXpress
from canvasxpress.plot import graph

graph(
  CanvasXpress(
    render_to = "boxplot25",
    data = {
      "y": {
        "vars": [
          ["value"]
        ],
        "smps": [
          ["Obs1"],
          ["Obs2"],
          ["Obs3"],
          ["Obs4"],
          ["Obs5"],
          ["Obs6"],
          ["Obs7"],
          ["Obs8"],
          ["Obs9"],
          ["Obs10"],
          ["Obs11"],
          ["Obs12"],
          ["Obs13"],
          ["Obs14"],
          ["Obs15"],
          ["Obs16"],
          ["Obs17"],
          ["Obs18"],
          ["Obs19"],
          ["Obs20"],
          ["Obs21"],
          ["Obs22"],
          ["Obs23"],
          ["Obs24"],
          ["Obs25"],
          ["Obs26"],
          ["Obs27"],
          ["Obs28"],
          ["Obs29"],
          ["Obs30"],
          ["Obs31"],
          ["Obs32"],
          ["Obs33"],
          ["Obs34"],
          ["Obs35"],
          ["Obs36"],
          ["Obs37"],
          ["Obs38"],
          ["Obs39"],
          ["Obs40"],
          ["Obs41"],
          ["Obs42"],
          ["Obs43"],
          ["Obs44"],
          ["Obs45"],
          ["Obs46"],
          ["Obs47"],
          ["Obs48"],
          ["Obs49"],
          ["Obs50"],
          ["Obs51"],
          ["Obs52"],
          ["Obs53"],
          ["Obs54"],
          ["Obs55"],
          ["Obs56"],
          ["Obs57"],
          ["Obs58"],
          ["Obs59"],
          ["Obs60"],
          ["Obs61"],
          ["Obs62"],
          ["Obs63"],
          ["Obs64"],
          ["Obs65"],
          ["Obs66"],
          ["Obs67"],
          ["Obs68"],
          ["Obs69"],
          ["Obs70"],
          ["Obs71"],
          ["Obs72"],
          ["Obs73"],
          ["Obs74"],
          ["Obs75"],
          ["Obs76"],
          ["Obs77"],
          ["Obs78"],
          ["Obs79"],
          ["Obs80"],
          ["Obs81"],
          ["Obs82"],
          ["Obs83"],
          ["Obs84"],
          ["Obs85"],
          ["Obs86"],
          ["Obs87"],
          ["Obs88"],
          ["Obs89"],
          ["Obs90"]
        ],
        "data": [
          [
            [4.311],
            [5.202],
            [4.081],
            [6.755],
            [5.362],
            [4.097],
            [5.536],
            [5.812],
            [5.633],
            [4.664],
            [6.663],
            [5.429],
            [4.317],
            [2.564],
            [6.237],
            [4.951],
            [4.982],
            [6.038],
            [5.903],
            [5.653],
            [6.011],
            [5.86],
            [5.082],
            [2.812],
            [6.844],
            [6.033],
            [5.913],
            [4.335],
            [5.526],
            [6.602],
            [7.73],
            [5.977],
            [6.565],
            [6.035],
            [4.448],
            [5.602],
            [5.627],
            [6.029],
            [7.42],
            [7.016],
            [5.903],
            [5.796],
            [6.936],
            [6.768],
            [5.273],
            [5.251],
            [7.374],
            [7.899],
            [6.754],
            [8.045],
            [7.418],
            [6.104],
            [7.343],
            [5.432],
            [8.763],
            [9.475],
            [6.423],
            [5.543],
            [7.641],
            [6.724],
            [10.022],
            [6.849],
            [7.797],
            [6.936],
            [5.934],
            [7.145],
            [4.554],
            [8.805],
            [7.099],
            [7.473],
            [5.776],
            [4.59],
            [5.911],
            [4.366],
            [4.046],
            [5.591],
            [4.857],
            [5.301],
            [5.374],
            [4.71],
            [4.731],
            [5.165],
            [6.478],
            [3.776],
            [5.894],
            [5.633],
            [6.363],
            [4.996],
            [5.67],
            [5.567]
          ]
        ]
      },
      "x": {
        "group": [
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["Control"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseA"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseB"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"],
          ["DoseC"]
        ]
      }
    },
    config = {
      "graphType": "Boxplot",
      "groupingFactors": [
        ["group"]
      ],
      "title": "Tooth growth by dose with pairwise significance (Welch t-test, BH-adjusted)",
      "xAxisTitle": "value",
      "smpTitle": "group",
      "showBoxplotIfViolin": True,
      "showStatInference": True,
      "statInference": {
        "correction": {
          "method": "BH",
          "scope": "panel"
        },
        "annotate": "stars",
        "comparisons": [
          {
            "groups": ["Control", "DoseA"],
            "p": 0.00258746
          },
          {
            "groups": ["Control", "DoseB"],
            "p": 4.7e-07
          },
          {
            "groups": ["DoseA", "DoseB"],
            "p": 0.00116248
          },
          {
            "groups": ["Control", "DoseC"],
            "p": 0.53069114
          }
        ]
      },
      "graphOrientation": "vertical"
    },
    width = 600,
    height = 600
  )
)
using CanvasXpress

canvasxpress(Dict(
  "y" => Dict(
    "vars" => [
      ["value"]
    ],
    "smps" => [
      ["Obs1"],
      ["Obs2"],
      ["Obs3"],
      ["Obs4"],
      ["Obs5"],
      ["Obs6"],
      ["Obs7"],
      ["Obs8"],
      ["Obs9"],
      ["Obs10"],
      ["Obs11"],
      ["Obs12"],
      ["Obs13"],
      ["Obs14"],
      ["Obs15"],
      ["Obs16"],
      ["Obs17"],
      ["Obs18"],
      ["Obs19"],
      ["Obs20"],
      ["Obs21"],
      ["Obs22"],
      ["Obs23"],
      ["Obs24"],
      ["Obs25"],
      ["Obs26"],
      ["Obs27"],
      ["Obs28"],
      ["Obs29"],
      ["Obs30"],
      ["Obs31"],
      ["Obs32"],
      ["Obs33"],
      ["Obs34"],
      ["Obs35"],
      ["Obs36"],
      ["Obs37"],
      ["Obs38"],
      ["Obs39"],
      ["Obs40"],
      ["Obs41"],
      ["Obs42"],
      ["Obs43"],
      ["Obs44"],
      ["Obs45"],
      ["Obs46"],
      ["Obs47"],
      ["Obs48"],
      ["Obs49"],
      ["Obs50"],
      ["Obs51"],
      ["Obs52"],
      ["Obs53"],
      ["Obs54"],
      ["Obs55"],
      ["Obs56"],
      ["Obs57"],
      ["Obs58"],
      ["Obs59"],
      ["Obs60"],
      ["Obs61"],
      ["Obs62"],
      ["Obs63"],
      ["Obs64"],
      ["Obs65"],
      ["Obs66"],
      ["Obs67"],
      ["Obs68"],
      ["Obs69"],
      ["Obs70"],
      ["Obs71"],
      ["Obs72"],
      ["Obs73"],
      ["Obs74"],
      ["Obs75"],
      ["Obs76"],
      ["Obs77"],
      ["Obs78"],
      ["Obs79"],
      ["Obs80"],
      ["Obs81"],
      ["Obs82"],
      ["Obs83"],
      ["Obs84"],
      ["Obs85"],
      ["Obs86"],
      ["Obs87"],
      ["Obs88"],
      ["Obs89"],
      ["Obs90"]
    ],
    "data" => [
      [
        [4.311],
        [5.202],
        [4.081],
        [6.755],
        [5.362],
        [4.097],
        [5.536],
        [5.812],
        [5.633],
        [4.664],
        [6.663],
        [5.429],
        [4.317],
        [2.564],
        [6.237],
        [4.951],
        [4.982],
        [6.038],
        [5.903],
        [5.653],
        [6.011],
        [5.86],
        [5.082],
        [2.812],
        [6.844],
        [6.033],
        [5.913],
        [4.335],
        [5.526],
        [6.602],
        [7.73],
        [5.977],
        [6.565],
        [6.035],
        [4.448],
        [5.602],
        [5.627],
        [6.029],
        [7.42],
        [7.016],
        [5.903],
        [5.796],
        [6.936],
        [6.768],
        [5.273],
        [5.251],
        [7.374],
        [7.899],
        [6.754],
        [8.045],
        [7.418],
        [6.104],
        [7.343],
        [5.432],
        [8.763],
        [9.475],
        [6.423],
        [5.543],
        [7.641],
        [6.724],
        [10.022],
        [6.849],
        [7.797],
        [6.936],
        [5.934],
        [7.145],
        [4.554],
        [8.805],
        [7.099],
        [7.473],
        [5.776],
        [4.59],
        [5.911],
        [4.366],
        [4.046],
        [5.591],
        [4.857],
        [5.301],
        [5.374],
        [4.71],
        [4.731],
        [5.165],
        [6.478],
        [3.776],
        [5.894],
        [5.633],
        [6.363],
        [4.996],
        [5.67],
        [5.567]
      ]
    ]
  ),
  "x" => Dict(
    "group" => [
      ["Control"],
      ["Control"],
      ["Control"],
      ["Control"],
      ["Control"],
      ["Control"],
      ["Control"],
      ["Control"],
      ["Control"],
      ["Control"],
      ["Control"],
      ["Control"],
      ["Control"],
      ["Control"],
      ["Control"],
      ["Control"],
      ["Control"],
      ["Control"],
      ["Control"],
      ["Control"],
      ["Control"],
      ["Control"],
      ["Control"],
      ["Control"],
      ["DoseA"],
      ["DoseA"],
      ["DoseA"],
      ["DoseA"],
      ["DoseA"],
      ["DoseA"],
      ["DoseA"],
      ["DoseA"],
      ["DoseA"],
      ["DoseA"],
      ["DoseA"],
      ["DoseA"],
      ["DoseA"],
      ["DoseA"],
      ["DoseA"],
      ["DoseA"],
      ["DoseA"],
      ["DoseA"],
      ["DoseA"],
      ["DoseA"],
      ["DoseA"],
      ["DoseA"],
      ["DoseB"],
      ["DoseB"],
      ["DoseB"],
      ["DoseB"],
      ["DoseB"],
      ["DoseB"],
      ["DoseB"],
      ["DoseB"],
      ["DoseB"],
      ["DoseB"],
      ["DoseB"],
      ["DoseB"],
      ["DoseB"],
      ["DoseB"],
      ["DoseB"],
      ["DoseB"],
      ["DoseB"],
      ["DoseB"],
      ["DoseB"],
      ["DoseB"],
      ["DoseB"],
      ["DoseB"],
      ["DoseB"],
      ["DoseC"],
      ["DoseC"],
      ["DoseC"],
      ["DoseC"],
      ["DoseC"],
      ["DoseC"],
      ["DoseC"],
      ["DoseC"],
      ["DoseC"],
      ["DoseC"],
      ["DoseC"],
      ["DoseC"],
      ["DoseC"],
      ["DoseC"],
      ["DoseC"],
      ["DoseC"],
      ["DoseC"],
      ["DoseC"],
      ["DoseC"],
      ["DoseC"],
      ["DoseC"]
    ]
  )
);
  graphType = "Boxplot",
  groupingFactors = [
    ["group"]
  ],
  title = "Tooth growth by dose with pairwise significance (Welch t-test, BH-adjusted)",
  xAxisTitle = "value",
  smpTitle = "group",
  showBoxplotIfViolin = true,
  showStatInference = true,
  statInference = Dict(
    "correction" => Dict(
      "method" => "BH",
      "scope" => "panel"
    ),
    "annotate" => "stars",
    "comparisons" => [
      Dict(
        "groups" => ["Control", "DoseA"],
        "p" => 0.00258746
      ),
      Dict(
        "groups" => ["Control", "DoseB"],
        "p" => 4.7e-07
      ),
      Dict(
        "groups" => ["DoseA", "DoseB"],
        "p" => 0.00116248
      ),
      Dict(
        "groups" => ["Control", "DoseC"],
        "p" => 0.53069114
      )
    ]
  ),
  graphOrientation = "vertical"
)
⇧