library(ggplot2) library(readr) library(latex2exp) dat <- read_csv("M,a 0,0") x_lab <- function() { TeX(r"($M$)") } y_lab <- function() { TeX(r"($a \ \small{m \cdot s^{-2}}$)") } plt <- ggplot(data = dat, aes(x = M, y = a)) + geom_segment(x = 0, y = 0, xend = 1, yend = 9.8, col = "#0072B2", size = 1) + labs(x = x_lab(), y = y_lab()) + expand_limits(y = c(0, 10), x = c(0, 1)) plt ggsave("plot.svg", plot = plt, width = 5, height = 5, )