Gallery / Lines & time

line

Playfair's wheat and wages, 1565 to 1821

Two series in shillings on one panel: the price of a quarter of wheat swings, and the weekly wage of a good mechanic only climbs.

Playfair's wheat and wages, 1565 to 1821

Source

Svelte, builder, JSON

<script lang="ts">
  import {
    GeomLine,
    GeomPoint,
    GGPlot,
    Labs,
    ScaleColorManual,
    ScaleXContinuous,
    ThemeEconomist,
  } from "@ggsvelte/svelte";

  import { wheatAndWages } from "./data.js";
</script>

<GGPlot
  data={wheatAndWages}
  aes={{ x: "year", y: "value", color: "series" }}
  key={(row) => `${row.year}:${row.series}`}
  legendFocus
  width={640}
  height={400}
>
  <ThemeEconomist />
  <ScaleXContinuous
    breaks={[1600, 1650, 1700, 1750, 1800]}
    labels="d"
    nice={false}
  />
  <ScaleColorManual
    domain={["Wheat price", "Weekly wage"]}
    values={["#ed111a", "#014d64"]}
  />
  <Labs
    title="Playfair's wheat and wages, 1565–1821"
    subtitle="Shillings — the price swings, the wage only climbs"
    x="Year"
    y="Shillings"
    color="Series"
  />
  <GeomLine linewidth={2} />
  <GeomPoint size={1.6} />
</GGPlot>

Meta

Details

Family
Lines & time
Source
line/multi-series
Rendering
SVG
Techniques

line · point · color · legend · layers · theme · palette