Gallery / Points & scatter

path

Three penguins, three ellipses

A 95% bivariate normal ring around each species in bill and flipper length. The rings overlap where the birds do, and a few fall outside their own.

Three penguins, three ellipses

Source

Svelte, builder, JSON

<script lang="ts">
  import {
    GeomPath,
    GeomPoint,
    GGPlot,
    Labs,
    ScaleColorDiscrete,
    ThemeClassic,
  } from "@ggsvelte/svelte";

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

<GGPlot
  data={penguins}
  aes={{ x: "bill", y: "flipper", color: "species" }}
  width={640}
  height={400}
>
  <ThemeClassic />
  <ScaleColorDiscrete scheme="tableau10" />
  <Labs
    title="Three penguins, three ellipses"
    subtitle="95% bivariate normal rings around each species at Palmer Station"
    x="Bill length (mm)"
    y="Flipper length (mm)"
    color="Species"
  />
  <GeomPoint alpha={0.6} size={2.4} />
  <GeomPath stat="ellipse" level={0.95} segments={51} linewidth={1.5} />
</GGPlot>

Meta

Details

Family
Points & scatter
Source
path/ellipse-rings
Rendering
SVG
Techniques

path · ellipse · stat · confidence · group · point · theme