-
Notifications
You must be signed in to change notification settings - Fork 0
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
Pass latex2exp for axis titles #23
Comments
From offline conversation: > lab.y <- latex2exp::TeX(paste("Probability of",str_replace(spec[[params$ep]]$short,"^Any","any")), output = "expression")
> lab.y
LaTeX: Probability of any AE, Grade $\geq 3$
plotmath: 'Probability of any AE, Grade ' * {phantom() >= phantom()} * 3
> sim_summary %>%
+ ungroup %>%
+ mutate(gl = sprintf("%s (%s)",JPGR, DOSCAT)) %>%
+ pmforest::summarize_data(value = prob, group = TYPEHER2, group_level= gl) %>%
+ pmforest::plot_forest(digits=2, x_lab = substitute(lab.y)) |
Hey @dpolhamus, im just getting to this issue now. I was able to get the following code to work with Code# Data
dataDir <- system.file("test-data", package = "pmforest")
plotData <- readRDS(file.path(dataDir, "plotData.RDS"))
# Summarize Data
sumData <- plotData %>%
summarize_data(
value = stat,
group = GROUP,
metagroup = param,
group_level = LVL
)
# latex2exp/plotmath label
lab.y <- latex2exp::TeX("probability of Grade $\\geq 3$", output = "expression")
> lab.y
LaTeX: probability of Grade $\geq 3$
plotmath: 'probability of Grade ' * {phantom() >= phantom()} * 3 Plotplot_forest(sumData, x_lab = lab.y, CI_label=" ") As you can see, the label updated correctly. Note that
|
Would be nice to pass expressions or plotmath to
x_lab
, e.g., particularlylatex2exp
output.The text was updated successfully, but these errors were encountered: