1

This may seems weird. But I want to plot exactly 1 point in the middle of the plot. It's not a dataset; just one point, with the following conditions:

  • a % shape instead of normal circle shape
  • color red but outline blue

I make a desire output: enter image description here

I like using base R function, but ggplot2 suggestion will be appreciated too. ( but when I tried with ggplot, the input needs to be a dataframe?

Math Avengers
  • 762
  • 4
  • 15
  • 4
    Does this answer your question? [R plots: Is there any way to draw border, shadow or buffer around text labels?](https://stackoverflow.com/questions/25631216/r-plots-is-there-any-way-to-draw-border-shadow-or-buffer-around-text-labels) – Rémi Coulaud Jul 19 '20 at 08:00
  • @RémiCoulaud That's smart! I never thought of setting the `%` as a text rather than a symbol! So yes! – Math Avengers Jul 19 '20 at 20:47

1 Answers1

1

You will find how to draw the text with shadowtext in this post :

To make a plot without anything :

par(mfrow= c(1, 1),
    pty = "s")
plot(0, type = "n", xlab = "", ylab = "",  xaxt="n", yaxt = "n")


shadowtext(1, 0, labels = "%", col = "red", bg = "blue", cex = 3)

It gives you this picture :

enter image description here

Rémi Coulaud
  • 1,684
  • 1
  • 8
  • 19