I wonder if it is possible to specify the point radius of geom_points in the same unit as the axes (meters in my example). I have inventory data where the sampling probability of a tree relies to an individual radius.
# reading some example data
dat <- read.table(header=TRUE, text="x y radius
0 0 7.5
10 0 5.5
20 0 7
30 0 9")
dat
#> x y radius
#> 1 0 0 7.5
#> 2 10 0 5.5
#> 3 20 0 7.0
#> 4 30 0 9.0
I therefore need to draw the tree specific radius exactly to explain the method visually. I found older questions (like this four year old discussion: geom_point control radius exactly rather than scaling it) where the same problem was not finally solved. I wondered if there are may more recent approaches. I played around with scale_radius and scale_size_area but did not succeed. This is the code I tryed
ggplot(data = dat, aes(x = x, y = y, color = factor(dat$Nutz), size = radius * 2)) +
geom_point() + scale_radius(name = NULL, range = c(0, 50))
This gives what I am looking for using the graphics package
plot(dat$x, dat$y, asp = 1, xlim = c(0, 50),ylim = c(0, 50))
symbols(dat$x, dat$y, circles = dat$radius, inches = FALSE, add = TRUE)
Does anyone have a clue? All the best, Kai