Skip to content
Vega-Lite templates

Biology — Chart: Gene Counts

Approximate number of protein-coding genes.

Template previewVega-Lite
Rendering…

Make it your own.

{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "description": "Protein-coding genes",
  "data": {"values": [
    {"organism": "E. coli", "genes": 4400},
    {"organism": "Yeast", "genes": 6000},
    {"organism": "Fruit fly", "genes": 14000},
    {"organism": "Human", "genes": 20000},
    {"organism": "Rice", "genes": 35000}
  ]},
  "mark": "bar",
  "encoding": {
    "y": {"field": "organism", "type": "nominal", "sort": "-x", "title": "Organism"},
    "x": {"field": "genes", "type": "quantitative", "title": "protein-coding genes"},
    "color": {"field": "organism", "type": "nominal", "legend": null}
  }
}