Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addPolygon doesn't render when observation.based = TRUE #403

Closed
joshuaulrich opened this issue Jul 24, 2023 · 0 comments
Closed

addPolygon doesn't render when observation.based = TRUE #403

joshuaulrich opened this issue Jul 24, 2023 · 0 comments
Milestone

Comments

@joshuaulrich
Copy link
Owner

library(xts)
data(sample_matrix)
rets <- diff(log(as.xts(sample_matrix)[,"Close"]))[-1]

nr <- nrow(rets)
shade <- xts(cbind(u = rep(max(rets), nr), l = rep(min(rets), nr)), index(rets))

# shading renders
plot(rets)
addPolygon(shade["2007-02"], col = "grey", on = -1)

# shading does not render
plot(rets, observation.based = TRUE)
addPolygon(shade["2007-02"], col = "grey", on = -1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant