Skip to content

Commit

Permalink
Switched the x-y axes back for plot(object,diagnostic=T) for cpt.rang…
Browse files Browse the repository at this point in the history
…e objects
  • Loading branch information
rkillick committed Oct 14, 2024
1 parent fc13ed1 commit 5329b79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/cpt.class.R
Original file line number Diff line number Diff line change
Expand Up @@ -778,9 +778,9 @@ setClass("cpt",slots=list(data.set="ts", cpttype="character", method="character"
penalty.values = pen.value.full(x)
if (is.null(list(...)$type)) {
# By default, the type of the diagnostic plots is "lines".
plot(x = penalty.values, y = n.changepoints, type="s",ylab = 'Number of Changepoints', xlab = 'Penalty Value', ...)
plot(x = n.changepoints, y = penalty.values, type="s",xlab = 'Number of Changepoints', ylab = 'Penalty Value', ...)
} else {
plot(x = penalty.values, y = n.changepoints,ylab = 'Number of Changepoints', xlab = 'Penalty Value', ...)
plot(x = n.changepoints, y = penalty.values,xlab = 'Number of Changepoints', ylab = 'Penalty Value', ...)
}
return(invisible(NULL))
}
Expand Down

0 comments on commit 5329b79

Please sign in to comment.