Skip to content

Commit

Permalink
fix strips for the case of one variable
Browse files Browse the repository at this point in the history
  • Loading branch information
altairwei committed Mar 21, 2024
1 parent 6b718b0 commit 674ecfd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/plot.euler.R
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ plot.euler <- function(x,
name = "strip.top.vp",
layout = grid::grid.layout(nrow = 1, ncol = layout[2]))

lvls <- levels(strips$groups[[2]])
lvls <- levels(strips$groups[[ names(layout)[[2]] ]])
n_lvls <- length(lvls)
step <- 1/n_lvls

Expand All @@ -567,7 +567,7 @@ plot.euler <- function(x,
name = "strip.left.vp",
layout = grid::grid.layout(nrow = layout[1], ncol = 1))

lvls <- rev(levels(strips$groups[[1]]))
lvls <- rev(levels(strips$groups[[ names(layout)[[1]] ]]))
n_lvls <- length(lvls)
step <- 1/n_lvls

Expand Down

0 comments on commit 674ecfd

Please sign in to comment.