Skip to content

Commit

Permalink
Fix lintr error and small change to ensure ellipsis shape
Browse files Browse the repository at this point in the history
  • Loading branch information
Monika-H committed Mar 6, 2024
1 parent bed6481 commit d98ed03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion R/internal.R
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@
# To create ellipsis shape and avoid overlapping between both of them,
# set the height to 80% of the SE (minimum scaled in x-axis or y-axis range)
width <- (100 - start_binary_endpoint) * min(binary_meta$se) / 100
y_range <- ((max(actv_y, ctrl_y) + 10) * min(binary_meta$se) / 100) * 0.6
y_range <- (max(actv_y, ctrl_y) + 10) * (width / 100)
y_height <- min(c(0.4 * abs(actv_y - ctrl_y), 0.8 * min(width, y_range)))

# Create ellipsis centered around proportion estimate (x0) as well as
Expand Down
6 changes: 3 additions & 3 deletions R/internal_winOdds.R
Original file line number Diff line number Diff line change
Expand Up @@ -211,16 +211,16 @@
plot <- plot +
ggplot2::geom_vline(xintercept =
seq(0.5, length(levels(wins_forest$GROUP)) + 1.5,
1),
1),
linetype = 2, linewidth = 0.3, color = "darkgray") +
scale_color_manual(values = c("black", "grey50")) +
scale_fill_manual(values = c("black", "grey50")) +
ylab("Win Odds / Win Ratio") +
theme_bw() +
theme(legend.position = "bottom",
legend.title = element_blank(),
panel.grid.major.y = ggplot2::element_blank(),
panel.grid.minor.y = ggplot2::element_blank())
panel.grid.major.y = ggplot2::element_blank(),
panel.grid.minor.y = ggplot2::element_blank())
}

return(plot)
Expand Down

0 comments on commit d98ed03

Please sign in to comment.