Skip to content
Open
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
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ where the formatting is also better._
- Fixed Issue #545 where xaxs/yaxs were not restored when set by an internal function.
(#545 @zeileis)

- Fixed Issue #553 where `facet.args = list(free = TRUE)` lead to an error when used
used without facets (#554 @zeileis)

### Breaking changes

## v0.6.0
Expand Down
4 changes: 2 additions & 2 deletions R/facet.R
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,8 @@ draw_facet_window = function(
if (isTRUE(facet.args[["free"]])) {
# First, we need to calculate the plot extent and axes range of each
# individual facet.
xfree = split(c(x, xmin, xmax), facet)[[ii]]
yfree = split(c(y, ymin, ymax), facet)[[ii]]
xfree = if (!is.null(facet)) split(c(x, xmin, xmax), facet)[[ii]] else c(x, xmin, xmax)
yfree = if (!is.null(facet)) split(c(y, ymin, ymax), facet)[[ii]] else c(y, ymin, ymax)
if (null_xlim) xlim = range(xfree, na.rm = TRUE)
if (null_ylim) ylim = range(yfree, na.rm = TRUE)
xext = extendrange(xlim, f = 0.04)
Expand Down