Gist demonstrating an R error
✓ Published0🌍 Public
LLeeMendelowitz
Last edited Jul 23, 2014
Created on Jul 23, 2014
This example demonstrates a subtle ggplot2 error that occurs when mapping the `size` aesthetic in a scatter plot while also adding multiple `geom_path` layers for circles. The code uses the `ggplot()` function with `aes(x, y, size = s)` and `geom_point()`, then attempts to overlay concentric circles via `geom_path()` using a helper function `make.circle()`. The error arises only in `make.plot.1()`, which combines both the size mapping and the circle paths, while `make.plot.2()` (no size mapping) and `make.plot.3()` (no circles) run successfully, isolating the conflict between these features.
AI-generated description