Skip to content

v0.10.0

Choose a tag to compare

@sipemu sipemu released this 06 Jul 10:08
· 627 commits to main since this release

Spatial support — the geom_sf epic (#18), plus the R-fidelity fixes since v0.9.0.

Spatial (new, opt-in)

  • geom_sf (feature sf): render points / lines / (multi)polygons from a geometry column of WKT — a self-contained parser, so the core stays dependency-free. fill drives choropleths; facets/legends work through the normal grammar.
  • coord_sf + map projections (feature sf): a SfProjection (equirectangular / spherical Web Mercator) applied consistently to scale-training and drawing, with coord_sf() enforcing equal aspect from the data extent.
  • GeoJSON reader (feature geojson): read_geojson_file loads a FeatureCollection into a plot-ready frame (geometry → WKT, properties → columns).
use ggplot_rs::spatial::geojson::read_geojson_file;
use ggplot_rs::{spatial::SfProjection, geom::sf::GeomSf};

let cols = read_geojson_file("countries.geojson")?;
GGPlot::new(cols)
    .aes(Aes::new().fill("gdp"))
    .geom_sf_with(GeomSf::default().project(SfProjection::Mercator))
    .coord_sf();

Also since v0.9.0

Validated against R ggplot2 4.0.3 and fixed every divergence found (#71): QQ ppoints, histogram + 2-D bin centering, stack order, LOESS degree-2, violin trim, ECDF ±Inf padding, and extended-Wilkinson axis breaks. See the v0.9.1/v0.9.2 notes.

No breaking changes — all new capability is behind the opt-in sf / geojson features.

🤖 Generated with Claude Code