← Back to all sparks
G

ggguides

ANALYTICS
Velocity0.0

Simplified Legend and Guide Alignment for 'ggplot2'

Three releases in one day to make legend positioning finally do what the docs said.

ggplot2legendsr-packagebugfix-trainapi-compatibility
Current state
ggguides is a helper layer over ggplot2's guide system, exposing legend placement and styling through small named functions instead of raw theme() calls. On 23 April 2026 it shipped 1.1.7, 1.1.8 and 1.1.9 within thirteen hours, each fixing a different path by which the justification argument silently did nothing. The common root cause is that ggplot2 3.5 split legend.justification into side-specific theme elements, and ggguides was still writing to the generic fallback.
Where it's heading
The package is in the phase where a wrapper meets the reality of the API it wraps. All three same-day releases are the same bug found in successive entry points: legend_inside(), then the four side functions, then legend_style(by = ). Along the way the fix work produced a real feature, a justification argument on the side legend functions. The pattern of a single reporter driving three consecutive releases suggests the surface is being audited rather than randomly patched.
Prediction
Expect a consolidation release that audits the remaining theme elements ggguides writes to against ggplot2 3.5 semantics, rather than another single-path fix.

Recent moves

  1. 3mo ago

    legend_style(by=) justification now reaches the whole-plot theme

    The third fix of the day, closing the last path where justification was written into a guide's embedded theme that ggplot2 never reads. Users who added a theme() workaround can now remove it.

    View source ↗
  2. 3mo ago

    Side legend functions gain justification and target the right theme element

    Fixes the four side functions to write to ggplot2's side-specific justification elements instead of the coerced generic fallback, which had been pinning left legends to the bottom. The same release turns the fix into a feature by adding a justification argument to all four.

    View source ↗
  3. 3mo ago

    legend_inside() justification now moves the legend as documented

    The first of the three same-day fixes, redirecting legend_inside() to legend.justification.inside. It exposed the class of bug that 1.1.8 and 1.1.9 then chased through the rest of the API.

    View source ↗
  4. 8mo ago

    Legend reordering, key overrides and colorbar styling added

    Adds legend_order(), legend_keys() and colorbar_style() alongside full vignettes. The last release that grew the surface before the April 2026 correction work.

    View source ↗