Skip to content
Vega-Lite templates

Physics — Chart: Particle Masses

Rest masses of subatomic particles (log scale).

Template previewVega-Lite
Rendering…

Make it your own.

{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "description": "Particle rest masses (MeV/c^2)",
  "data": {"values": [
    {"particle": "Electron", "mass": 0.511},
    {"particle": "Muon", "mass": 105.7},
    {"particle": "Proton", "mass": 938.3},
    {"particle": "Neutron", "mass": 939.6},
    {"particle": "Tau", "mass": 1777},
    {"particle": "W boson", "mass": 80400}
  ]},
  "mark": "bar",
  "encoding": {
    "x": {"field": "particle", "type": "nominal", "sort": "y", "title": "Particle"},
    "y": {"field": "mass", "type": "quantitative", "scale": {"type": "log"}, "title": "mass (MeV/c^2, log)"},
    "color": {"field": "particle", "type": "nominal", "legend": null}
  }
}