@@ -458,7 +458,9 @@ Scale <- ggproto("Scale", NULL,
458
458
# ' as described in e.g. [`?continuous_scale`][continuous_scale].
459
459
# ' Note that `limits` is expected in transformed space.
460
460
aesthetics = character (),
461
- palette = function () cli :: cli_abort(" Not implemented." ),
461
+ palette = function () {
462
+ cli :: cli_abort(" Not implemented." )
463
+ },
462
464
463
465
limits = NULL ,
464
466
na.value = NA ,
@@ -998,7 +1000,9 @@ ScaleContinuous <- ggproto("ScaleContinuous", Scale,
998
1000
n.breaks = NULL ,
999
1001
trans = transform_identity(),
1000
1002
1001
- is_discrete = function () FALSE ,
1003
+ is_discrete = function () {
1004
+ FALSE
1005
+ },
1002
1006
1003
1007
train = function (self , x ) {
1004
1008
if (length(x ) == 0 ) {
@@ -1257,7 +1261,9 @@ ScaleDiscrete <- ggproto("ScaleDiscrete", Scale,
1257
1261
n.breaks.cache = NULL ,
1258
1262
palette.cache = NULL ,
1259
1263
1260
- is_discrete = function () TRUE ,
1264
+ is_discrete = function () {
1265
+ TRUE
1266
+ },
1261
1267
1262
1268
train = function (self , x ) {
1263
1269
if (length(x ) == 0 ) {
@@ -1271,7 +1277,9 @@ ScaleDiscrete <- ggproto("ScaleDiscrete", Scale,
1271
1277
)
1272
1278
},
1273
1279
1274
- transform = identity ,
1280
+ transform = function (self , x ) {
1281
+ x
1282
+ },
1275
1283
1276
1284
map = function (self , x , limits = self $ get_limits()) {
1277
1285
limits <- vec_slice(limits , ! is.na(limits ))
@@ -1483,7 +1491,9 @@ ScaleBinned <- ggproto("ScaleBinned", Scale,
1483
1491
after.stat = FALSE ,
1484
1492
show.limits = FALSE ,
1485
1493
1486
- is_discrete = function () FALSE ,
1494
+ is_discrete = function () {
1495
+ FALSE
1496
+ },
1487
1497
1488
1498
train = function (self , x ) {
1489
1499
if (length(x ) == 0 ) {
@@ -1644,7 +1654,9 @@ ScaleBinned <- ggproto("ScaleBinned", Scale,
1644
1654
transformation $ transform(breaks )
1645
1655
},
1646
1656
1647
- get_breaks_minor = function (... ) NULL ,
1657
+ get_breaks_minor = function (... ) {
1658
+ NULL
1659
+ },
1648
1660
1649
1661
get_labels = function (self , breaks = self $ get_breaks()) {
1650
1662
if (is.null(breaks )) return (NULL )
0 commit comments