Last active
July 15, 2021 13:07
-
-
Save mrecos/6abb8e2668a49886ea3f4bcba30c2ae5 to your computer and use it in GitHub Desktop.
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
dat <- data.frame(Response = c("Yes","No"), Value = c(0.32,0.68)) | |
ggplot(dat, aes(x = Response, y = Value)) + | |
geom_bar(stat = "identity", width = 0.5) + | |
xlab("") + | |
ylab("") + | |
theme_bw() + | |
scale_y_continuous(limits = c(0,1)) + | |
geom_text(aes(label = paste0(Value*100,"%")), vjust = -1, | |
hjust = 0.5, face = "bold", size = 6) + | |
labs(title = "Will Ethics be a Primary Focus in 2030?", | |
subtitle = "602 responses non-randomly selected", | |
caption = "Source: https://tinyurl.com/yt9xz4z7\nCode for plot:https://tinyurl.com/rxep5e2v") + | |
theme(axis.text.x = element_text(angle = 0, hjust = 0.5, | |
face = "bold", size = 20), | |
axis.text.y = element_blank(), | |
axis.title.y = element_blank(), | |
axis.ticks.y = element_blank()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment