Skip to content

Commit c9ba9bb

Browse files
committed
add backtransform_range() to coord_map
1 parent 17b1127 commit c9ba9bb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

R/coord-map.r

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ CoordMap <- ggproto("CoordMap", Coord,
119119
out
120120
},
121121

122+
backtransform_range = function(panel_params) {
123+
# range is stored in data coordinates and doesn't have to be back-transformed
124+
list(x = panel_params$x.range, y = panel_params$y.range)
125+
},
126+
122127
distance = function(x, y, panel_params) {
123128
max_dist <- dist_central_angle(panel_params$x.range, panel_params$y.range)
124129
dist_central_angle(x, y) / max_dist

0 commit comments

Comments
 (0)