{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "title": "Median roughness",
  "background": "transparent",
  "data": {
    "url": "scene_crossing_scalar_summary.csv",
    "format": {
      "type": "csv",
      "parse": {
        "q25": "number",
        "median": "number",
        "q75": "number",
        "p90": "number"
      }
    }
  },
  "config": {
    "font": "Inter",
    "view": {
      "stroke": null
    },
    "axis": {
      "domainColor": "#D1D5DB",
      "gridColor": "#E5E7EB",
      "labelColor": "#4B5563",
      "labelFontSize": 11,
      "tickSize": 0,
      "titleColor": "#4B5563",
      "titleFontSize": 11
    },
    "legend": {
      "labelColor": "#374151",
      "labelFontSize": 10,
      "symbolStrokeWidth": 0,
      "title": null
    },
    "header": {
      "labelColor": "#374151",
      "labelFontSize": 12,
      "labelFontWeight": 600,
      "title": null
    },
    "title": {
      "anchor": "start",
      "color": "#111827",
      "fontSize": 16,
      "fontWeight": 600
    }
  },
  "transform": [
    {
      "filter": "datum.metric === 'median_roughness' && isValid(datum.median)"
    }
  ],
  "facet": {
    "column": {
      "field": "kinematics_backend_label",
      "type": "nominal",
      "sort": [
        "Pinocchio",
        "SIMD"
      ]
    }
  },
  "spec": {
    "width": 280,
    "height": 270,
    "layer": [
      {
        "mark": {
          "type": "rule",
          "strokeWidth": 5,
          "opacity": 0.35
        },
        "encoding": {
          "x": {
            "field": "eval_group_label",
            "type": "ordinal",
            "sort": [
              "S/U",
              "S/C",
              "D/U",
              "D/C"
            ],
            "axis": {
              "title": null,
              "labelAngle": 0
            }
          },
          "xOffset": {
            "field": "planner_label",
            "sort": [
              "FACTO",
              "DRAFTO-GN",
              "CHOMP",
              "TrajOpt",
              "GPMP-LM"
            ]
          },
          "y": {
            "field": "q25",
            "type": "quantitative",
            "scale": {
              "zero": true
            },
            "axis": {
              "title": null
            }
          },
          "y2": {
            "field": "q75"
          },
          "color": {
            "field": "planner_label",
            "type": "nominal",
            "scale": {
              "domain": [
                "FACTO",
                "DRAFTO-GN",
                "CHOMP",
                "TrajOpt",
                "GPMP-LM"
              ],
              "range": [
                "#2563EB",
                "#EA580C",
                "#059669",
                "#0891B2",
                "#4F46E5"
              ]
            },
            "legend": {
              "orient": "bottom",
              "columns": 5
            }
          },
          "tooltip": [
            {
              "field": "planner_label",
              "title": "Planner"
            },
            {
              "field": "kinematics_backend_label",
              "title": "Backend"
            },
            {
              "field": "eval_group_label",
              "title": "Group"
            },
            {
              "field": "q25",
              "title": "Q1",
              "format": ".4g"
            },
            {
              "field": "median",
              "title": "Median",
              "format": ".4g"
            },
            {
              "field": "q75",
              "title": "Q3",
              "format": ".4g"
            },
            {
              "field": "p90",
              "title": "p90",
              "format": ".4g"
            }
          ]
        }
      },
      {
        "mark": {
          "type": "point",
          "filled": true,
          "size": 70,
          "stroke": "white"
        },
        "encoding": {
          "x": {
            "field": "eval_group_label",
            "type": "ordinal",
            "sort": [
              "S/U",
              "S/C",
              "D/U",
              "D/C"
            ],
            "axis": {
              "title": null,
              "labelAngle": 0
            }
          },
          "xOffset": {
            "field": "planner_label",
            "sort": [
              "FACTO",
              "DRAFTO-GN",
              "CHOMP",
              "TrajOpt",
              "GPMP-LM"
            ]
          },
          "y": {
            "field": "median",
            "type": "quantitative",
            "scale": {
              "zero": true
            }
          },
          "color": {
            "field": "planner_label",
            "type": "nominal",
            "scale": {
              "domain": [
                "FACTO",
                "DRAFTO-GN",
                "CHOMP",
                "TrajOpt",
                "GPMP-LM"
              ],
              "range": [
                "#2563EB",
                "#EA580C",
                "#059669",
                "#0891B2",
                "#4F46E5"
              ]
            },
            "legend": {
              "orient": "bottom",
              "columns": 5
            }
          },
          "tooltip": [
            {
              "field": "planner_label",
              "title": "Planner"
            },
            {
              "field": "kinematics_backend_label",
              "title": "Backend"
            },
            {
              "field": "eval_group_label",
              "title": "Group"
            },
            {
              "field": "q25",
              "title": "Q1",
              "format": ".4g"
            },
            {
              "field": "median",
              "title": "Median",
              "format": ".4g"
            },
            {
              "field": "q75",
              "title": "Q3",
              "format": ".4g"
            },
            {
              "field": "p90",
              "title": "p90",
              "format": ".4g"
            }
          ]
        }
      },
      {
        "mark": {
          "type": "tick",
          "thickness": 2,
          "size": 9
        },
        "encoding": {
          "x": {
            "field": "eval_group_label",
            "type": "ordinal",
            "sort": [
              "S/U",
              "S/C",
              "D/U",
              "D/C"
            ],
            "axis": {
              "title": null,
              "labelAngle": 0
            }
          },
          "xOffset": {
            "field": "planner_label",
            "sort": [
              "FACTO",
              "DRAFTO-GN",
              "CHOMP",
              "TrajOpt",
              "GPMP-LM"
            ]
          },
          "y": {
            "field": "p90",
            "type": "quantitative",
            "scale": {
              "zero": true
            }
          },
          "color": {
            "field": "planner_label",
            "type": "nominal",
            "scale": {
              "domain": [
                "FACTO",
                "DRAFTO-GN",
                "CHOMP",
                "TrajOpt",
                "GPMP-LM"
              ],
              "range": [
                "#2563EB",
                "#EA580C",
                "#059669",
                "#0891B2",
                "#4F46E5"
              ]
            },
            "legend": {
              "orient": "bottom",
              "columns": 5
            }
          },
          "tooltip": [
            {
              "field": "planner_label",
              "title": "Planner"
            },
            {
              "field": "kinematics_backend_label",
              "title": "Backend"
            },
            {
              "field": "eval_group_label",
              "title": "Group"
            },
            {
              "field": "q25",
              "title": "Q1",
              "format": ".4g"
            },
            {
              "field": "median",
              "title": "Median",
              "format": ".4g"
            },
            {
              "field": "q75",
              "title": "Q3",
              "format": ".4g"
            },
            {
              "field": "p90",
              "title": "p90",
              "format": ".4g"
            }
          ]
        }
      }
    ]
  },
  "resolve": {
    "scale": {
      "y": "shared",
      "color": "shared"
    }
  }
}
