Created
September 9, 2018 21:47
-
-
Save chris-prener/12f3f63046dfa8200477dd89018e9dec 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
library(dplyr) | |
library(ggplot2) | |
library(latex2exp) | |
abline <- as_tibble(data.frame( | |
xmin = c(0), | |
xmax = c(10), | |
ymin = c(5), | |
ymax = c(5) | |
)) | |
ggplot() + | |
geom_segment(data = abline, mapping = aes(x = xmin, xend = xmax, y = ymin, yend = ymax), | |
colour = "#E84C06", size = 1.5) + | |
scale_x_continuous(breaks = c(0,2,4,6,8,10)) + | |
scale_y_continuous(limits = c(0,10), breaks = c(0,2,4,6,8,10)) + | |
labs( | |
title = TeX('Simulated Distribution with $\\bar{x}$'), | |
x = "i", | |
y = "x" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment