Search code examples
rplotradix

Is there a way to plot a single origin symbol at the origin in base R?


I am trying to plot a capital, italized O at the origin, but how do I plot in that area?

MWE:

par(mar = c(6, 6, 4, 3) + 0.1, mgp = c(4, 1, 0))
x <- c(0, 10)
y <- c(0, 10)
plot(x, y, axes = FALSE, xaxs = "i", yaxs = "i", type = "n", ylab = "")
mtext(expression(y), 2, 4, las = 1)
axis(1, 0:10, c("", 1:10))
axis(2, 0:10, c("", 1:10), las = 1)

Origin location


Solution

  • If you want to use R-base try this:

    plot(x, y, axes = FALSE, xaxs = "i", yaxs = "i", type = "n", ylab = "")
    mtext(expression(italic('O')), side=1, line=0, at=0, adj = 1.5)
    mtext(expression(y), 2, 4, las = 1)
    axis(1, 0:10, c("", 1:10))
    axis(2, 0:10, c("", 1:10), las = 1)