Closed
Description
Hi,
I am aware of #4024 and #3741 that modify geom_abline. Through, the abline modification in 3.3.4 has had some strange results for the default y limits, maintening my modest package disaggR and in particular its autoplot method for in_scatter. I can't decide if it's a feature or a bug, I'm sorry if I make a mistake to report that.
object <- in_scatter(twoStepsBenchmark(turnover,construction))
n <- nrow(object)
df <- data.frame(Time=as.numeric(time(object))[-1L],
`High-frequency serie` = object[-n,2L],
`Low-frequency serie` = object[-n,1L],
xend = object[-1L,2L],
yend = object[-1L,1L], check.names = FALSE)
ggplot() +
geom_abline(intercept = attr(object,"coefficients")["constant"],
slope = attr(object,"coefficients")[names(attr(object,"coefficients")) != "constant"],
lty = "solid", colour = "red", size = 1) +
geom_segment(data=df,
aes(x = `High-frequency serie`, y = `Low-frequency serie`,
xend = xend, yend = yend,
colour = Time),
arrow=arrow(angle = 15,
ends = "last",
type = "closed",
length = unit(0.1,"inches")),
na.rm = TRUE)