Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions R/coord-.r
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ Coord <- ggproto("Coord",

is_linear = function() FALSE,

# Does the coordinate system support free scaling of axes in a faceted plot?
# Will generally have to return FALSE for coordinate systems that enforce a fixed aspect ratio.
is_free = function() FALSE,

setup_params = function(data) {
Expand Down
3 changes: 3 additions & 0 deletions R/sf.R
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,9 @@ CoordSf <- ggproto("CoordSf", CoordCartesian,
)
},

# CoordSf enforces a fixed aspect ratio -> axes cannot be changed freely under faceting
is_free = function() FALSE,

aspect = function(self, panel_params) {
if (isTRUE(sf::st_is_longlat(panel_params$crs))) {
# Contributed by @edzer
Expand Down