I want to present the temperature on the Y-axis label as 'Water Temperature (oC)' with the degree symbol as a superscript.
My web search found a couple of methods; one put the entire example string in the axis label, the other is close, but still incorrect. Source example: #define expression with superscript x_expression <- expression(x^3 ~ variable ~ label) # The example axis label is: 'X3 variable label' (with the 3 as a superscript) My use: # Set degree symbol as superscript in plot's y axis: y_expression <- expression(^o ~ C) R's error message: Error in source("../scripts/all_temp_plots.r") : ../scripts/all_temp_plots.r:10:28: unexpected '^' 9: # Set degree symbol as superscript in plot's y axis: 10: y_expression <- expression(^ ^ What is the proper way to display a degree symbol in a plot's axis label? Rich ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.