Skip to content

Commit

Permalink
bug in second figure (if first core dont have data for 75, 50 or 25% …
Browse files Browse the repository at this point in the history
…extrapolation it ignores other cores that may have data). Fixed!
  • Loading branch information
NPJuncal committed Sep 19, 2024
1 parent a4924ae commit 63bfcfe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/test_extrapolation.R
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ colnames(predictions) <- c("stock_90", "stock_90_se", "stock_75", "stock_75_se",
p2 <- ggplot(stocks_f, aes(stock, stock_90)) +
xlab("Observed Stock") + ylab("Extrapolated stock") +
geom_point(aes(color = "90%"), size = 2) +
{if (!is.na(stocks75[1,1])) geom_point(aes(stock, stock_75, color = "75%"), size = 2)} +
{if (!is.na(stocks50[1,1])) geom_point(aes(stock, stock_50, color = "50%"), size = 2)} +
{if (!is.na(stocks25[1,1])) geom_point(aes(stock, stock_25, color = "25%"), size = 2)} +
{if (!all(is.na(stocks75$mStock))) geom_point(aes(stock, stock_75, color = "75%"), size = 2)} +
{if (!all(is.na(stocks50$mStock))) geom_point(aes(stock, stock_50, color = "50%"), size = 2)} +
{if (!all(is.na(stocks25$mStock))) geom_point(aes(stock, stock_25, color = "25%"), size = 2)} +
theme(text = element_text(size = 15)) +
labs(color = NULL) +
xlim(0, limits) + ylim(0, limits) +
Expand Down

0 comments on commit 63bfcfe

Please sign in to comment.