Skip to content

Commit aebe355

Browse files
committed
Add scale_alpha_continuous
1 parent fded552 commit aebe355

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

NEWS

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ ggplot2 0.8.5 (2009-XX-XX) ----------------------------------------
2929
instead of the previous behaviour where scales where added as layers were
3030
added - this could cause problems if you layer modified the plot.
3131
(Implements #28)
32-
* scale_shape_discrete, scale_size_continuous and scale_linetype_discrete
33-
added to scales to match naming convention of all other scales (Fixes #47)
32+
* scale_shape_discrete, scale_size_continuous, scale_alpha and
33+
scale_linetype_discrete added to scales to match naming convention of all
34+
other scales (Fixes #47)
3435
* scale_colour_gradient, scale_colour_gradient2 & scale_colour_gradientn now
3536
have formatter argument to match scale_continuous
3637
* legends will only merge if both the title and all labels are the same.
37-
(Fixes #16)
38+
(Fixes #16)

R/scale-continuous-alpha.r

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
ScaleAlpha <- proto(ScaleContinuous, expr={
1+
ScaleAlphaContinuous <- proto(ScaleContinuous, expr={
22
doc <- TRUE
33
common <- NULL
4+
alias <- "scale_alpha"
45

56
new <- function(., name=NULL, limits=NULL, breaks=NULL, labels=NULL, trans = NULL, to = c(0.1, 1), legend = TRUE) {
67
.super$new(., name=name, limits=limits, breaks=breaks, labels=labels, trans=trans, variable = "alpha", to = to, legend = legend)
@@ -11,7 +12,7 @@ ScaleAlpha <- proto(ScaleContinuous, expr={
1112
}
1213
output_breaks <- function(.) .$map(.$input_breaks())
1314

14-
objname <- "alpha"
15+
objname <- "alpha_continuous"
1516
desc <- "Alpha scale for continuous variable"
1617

1718
icon <- function(.) {

R/xxx.r

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ position_identity <- PositionIdentity$build_accessor()
4545
position_jitter <- PositionJitter$build_accessor()
4646
position_stack <- PositionStack$build_accessor()
4747
scale_alpha <- ScaleAlpha$build_accessor()
48+
scale_alpha_continuous <- ScaleAlphaContinuous$build_accessor()
4849
scale_area <- ScaleArea$build_accessor()
4950
scale_colour <- ScaleColour$build_accessor()
5051
scale_colour_brewer <- ScaleBrewer$build_accessor(list(variable = "\"colour\""))

0 commit comments

Comments
 (0)