Skip to content

Commit

Permalink
refactor: plot.peak_list (minor)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanbass committed Mar 14, 2024
1 parent e922cde commit 51679d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/plot.peak_list.R
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ plot.peak_list <- function(x, ..., chrom_list, idx = 1, lambda = NULL,

#' @noRd
draw_trapezoid <- function(peak.loc, yvals, color, a){
sapply(1:(length(peak.loc) - 1), function(i){
sapply(seq_len(length(peak.loc) - 1), function(i){
polygon(peak.loc[c(i, i, (i + 1), (i + 1))], c(0, yvals[i:(i + 1)], 0),
col=alpha(color, a), lty = 3, border = NA)
col = scales::alpha(color, a), lty = 3, border = NA)
})
}

0 comments on commit 51679d6

Please sign in to comment.