Skip to content

Document Format

Naming

  • Document: the canonical plot data/config payload.
  • Session: document + additional UI view state for the editor.

Document example (version: "1.0")

{
  "version": "1.0",
  "datasets": [
    {
      "id": "ds-line-1",
      "name": "Signal",
      "columns": [
        { "id": "col-x", "name": "x", "kind": "raw", "role": "x", "values": [0, 1, 2] },
        { "id": "col-y", "name": "y", "kind": "raw", "role": "y", "values": [0.0, 1.1, 2.1] }
      ]
    }
  ],
  "layers": [
    {
      "id": "layer-line-1",
      "dataset_id": "ds-line-1",
      "y_column_id": "col-y",
      "label": "Signal",
      "visible": true,
      "style": { "color": "#005f73", "linewidth": 2.0, "marker": "o" }
    }
  ],
  "axes": {
    "title": "Very Nice Data",
    "x_label": "Time",
    "y_label": "Value",
    "x_lim": [0.0, 2.0],
    "y_lim": [0.0, 2.2],
    "grid": true,
    "legend": { "visible": true, "x": 0.02, "y": 0.98, "framealpha": 0.9 }
  },
  "annotations": [],
  "fits": []
}

Session envelope example

{
  "session_version": "2.0",
  "saved_at": "2026-03-21T18:00:00Z",
  "document": { "...": "document payload" },
  "view": {
    "figure_width_cm": 15.24,
    "figure_height_cm": 10.16,
    "dpi": 150.0,
    "selected_fit_id": "",
    "annotation_position_mode": "data",
    "show_edit_overlays": true,
    "export_format": "png",
    "include_export_edit_remark": true
  }
}

Versioning

  • pontink package is independently versioned (1.0.0 currently).
  • The pont.ink document/session JSON schema version is currently 1.0.