Skip to content

Commit

Permalink
removed condition
Browse files Browse the repository at this point in the history
apply input recycling in all scenarios
  • Loading branch information
ethanbsmith committed Jul 28, 2024
1 parent 6590b39 commit 77f8144
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,10 @@ plot.xts <- function(x,
legend.loc=NULL,
extend.xaxis=FALSE){

if (as.numeric(multi.panel) > 0){
# allow color and line attributes for each panel in a multi.panel plot
if(length(lty) < ncol(x)) lty <- rep(lty, length.out = ncol(x))
if(length(lwd) < ncol(x)) lwd <- rep(lwd, length.out = ncol(x))
if(length(col) < ncol(x)) col <- rep(col, length.out = ncol(x))
}
# recycle inputs
if(length(lty) < ncol(x)) lty <- rep(lty, length.out = ncol(x))
if(length(lwd) < ncol(x)) lwd <- rep(lwd, length.out = ncol(x))
if(length(col) < ncol(x)) col <- rep(col, length.out = ncol(x))

# Small multiples with multiple pages behavior occurs when multi.panel is
# an integer. (i.e. multi.panel=2 means to iterate over the data in a step
Expand Down

0 comments on commit 77f8144

Please sign in to comment.