I am generating a bunch of plots and have stored the appropriate labels for axes in my plots in a list:
labels_list <- c("C[max,1] (mg/L)",
"AUC[
6wks,1] (mg*day/L)",
"somethingElse[subscriptText] (units*might/have*symbols)")
My goal is to create labels where the text in the square brackets are subscripts. I have been using parse()
which is okay, except:
- I can't figure out how to get the axes labels to be bold, though it is specified in my custom ggplot theme
- The asterisk disappears.
I know that bquote()
is an option, but I haven't figured out how to use it if I just want to provide a list of strings as inputs like above. I'm definitely open to any suggestions and solutions provided.
EDIT: It seems that I cannot use my string inputs as-is? labels_list
is extracted from a data frame and I would love to not have to, one-by-one, change this for plotting purposes. :-(