Created
September 8, 2015 05:50
-
-
Save lx-88/b973f9551aa5d3167c7e to your computer and use it in GitHub Desktop.
Include a superscript in a ggplot2 axis label. Useful for a unit...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# use expression | |
# within expression, ~ represents a space | |
chanDensity_plot <- ggplot(data=chan_density_df, aes(x=site, y=density)) + | |
geom_bar(stat='identity') + | |
labs(x="Site", y=expression(Channel~Density~(km/km^2)), title='LIDAR-derived channel density') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment