Skip to content

Commit 964b4b5

Browse files
committed
Don't use deprecated scale_area
1 parent ecbce50 commit 964b4b5

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

R/fortify-lm.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
#' geom_abline(slope = seq(0, 3, by = 0.5), colour = "white") +
6060
#' geom_smooth(se = FALSE) +
6161
#' geom_point()
62-
#' qplot(.hat, .cooksd, size = .cooksd / .hat, data = mod) + scale_area()
62+
#' qplot(.hat, .cooksd, size = .cooksd / .hat, data = mod) + scale_size_area()
6363
fortify.lm <- function(model, data = model$model, ...) {
6464
infl <- influence(model, do.coef = FALSE)
6565
data$.hat <- infl$hat

R/geom-point-.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
#'
5959
#' # Change scales
6060
#' p + geom_point(aes(colour = cyl)) + scale_colour_gradient(low = "blue")
61-
#' p + geom_point(aes(size = qsec)) + scale_area()
61+
#' p + geom_point(aes(size = qsec)) + scale_size_area()
6262
#' p + geom_point(aes(shape = factor(cyl))) + scale_shape(solid = FALSE)
6363
#'
6464
#' # Set aesthetics to fixed value

R/scale-size.r

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
#'
1616
#' # Map area, instead of width/radius
1717
#' # Perceptually, this is a little better
18-
#' p + scale_area()
19-
#' p + scale_area(range = c(1, 25))
18+
#' p + scale_size_area()
19+
#' p + scale_size_area(range = c(1, 25))
2020
#'
2121
#' # Also works with factors, but not a terribly good
2222
#' # idea, unless your factor is ordered, as in this example

R/stat-sum.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#' # by overall proportion
2525
#' d + stat_sum(aes(group = 1))
2626
#' d + stat_sum(aes(group = 1)) + scale_size(range = c(3, 10))
27-
#' d + stat_sum(aes(group = 1)) + scale_area(range = c(3, 10))
27+
#' d + stat_sum(aes(group = 1)) + scale_size_area(range = c(3, 10))
2828
#'
2929
#' # by cut
3030
#' d + stat_sum(aes(group = cut))

man/fortify.lm.Rd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,6 @@ ggplot(mod, aes(.hat, .cooksd)) +
6868
geom_abline(slope = seq(0, 3, by = 0.5), colour = "white") +
6969
geom_smooth(se = FALSE) +
7070
geom_point()
71-
qplot(.hat, .cooksd, size = .cooksd / .hat, data = mod) + scale_area()
71+
qplot(.hat, .cooksd, size = .cooksd / .hat, data = mod) + scale_size_area()
7272
}
7373

man/geom_point.Rd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ p + geom_point(aes(size = qsec))
7070

7171
# Change scales
7272
p + geom_point(aes(colour = cyl)) + scale_colour_gradient(low = "blue")
73-
p + geom_point(aes(size = qsec)) + scale_area()
73+
p + geom_point(aes(size = qsec)) + scale_size_area()
7474
p + geom_point(aes(shape = factor(cyl))) + scale_shape(solid = FALSE)
7575

7676
# Set aesthetics to fixed value

man/scale_size.Rd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ p + scale_size(range = c(1, 2))
3333

3434
# Map area, instead of width/radius
3535
# Perceptually, this is a little better
36-
p + scale_area()
37-
p + scale_area(range = c(1, 25))
36+
p + scale_size_area()
37+
p + scale_size_area(range = c(1, 25))
3838

3939
# Also works with factors, but not a terribly good
4040
# idea, unless your factor is ordered, as in this example

man/stat_sum.Rd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ d + stat_sum()
5050
# by overall proportion
5151
d + stat_sum(aes(group = 1))
5252
d + stat_sum(aes(group = 1)) + scale_size(range = c(3, 10))
53-
d + stat_sum(aes(group = 1)) + scale_area(range = c(3, 10))
53+
d + stat_sum(aes(group = 1)) + scale_size_area(range = c(3, 10))
5454

5555
# by cut
5656
d + stat_sum(aes(group = cut))

0 commit comments

Comments
 (0)