Комментарии:
Hello Statistics Globe. Can you write the code to indicate "mg NH4+-N kg-1" where number 4 as subscript and the + sign as superscript. Thank you.
ОтветитьHi, Thank you very much for the video. I have a similar question. I want to plot multiple plots side by side using facets and each facets have subscripts. Here is what I tried but it is not working. NewDat1$facets = factor(NewDat1$Parameter, labels = c(
" Alkalinity",
"Ca (CaCO3)",
"Cl (mg/l),",
"Conductivity (mS/m)",
"Cu (mg/l)",
"F (mg/l)",
"Fe (mg/l)",
"K (mg/l",
"Mg (CaCO3)",
" Mn (mg/l)",
"Na (mg/l)",
"NO[3] (mg/l)",
"pH",
" 'SiO'[2] (mg/l)",
"SO[4] (mg/l)",
"TDS (TDS Calculated)",
"Turbidity (NTU)",
"Zn (mg/l)"))
and then created the plot like this:
ggplot(na.omit(NewDat1), aes(Year, Value, color = Location)) +
geom_line() +
geom_point()+
facet_wrap(~facets, scales = "free_y" )
How can I create the subscripts in the labels
Hi, I want to add a superscript in the variable name(e.g. x^2). How can I do that?
ОтветитьI am wondering…if you are German,… as your voice remind me my German lecturer. Thanks a a helpful video
ОтветитьHi, I just came up with another question as I'm creating a lot of plots for my bachelor thesis. I thought it might be in the interest of some other viewers as well since this is a common task.
Let's say I want to subscript within a ggplot legend label. If I type scale_color_manual(labels = c("Discharge",(expression("NO"[3]^"-"))) then the super- and subscripts work but unfortunately there is a wide blank space before the NO3- in the legend label. Is there another way than using expression for legend labels?
Thanks for the video. But let's say my title would be: "NO3- concentration in 2012" and I want to subscript the "3" and superscript the "-". How does it work then? It's similar to line 10 of the code but I can't seem to make it work because the NO3- is at the beginning of my title.
Ответить