3

enter image description here

Above is an image of a simple plot I have created with x,y co-ordinates. I have passed pch = as.character(1:32) into the plot, but after the first 9 characters, it will cut off the second character. How do you fix this? I guess I need to increase the width of each point?

Thanks!

Jobs
  • 95
  • 2

1 Answers1

3

You could use text with argument label like this:

df <- data.frame(x = c(rep(1:5, each = 5)),
                 y = c(rep(1:5, 5)))

plot(df$x, df$y, type='n')
text(df$x, df$y, label = 1:25)

Created on 2022-08-21 with reprex v2.0.2

Quinten
  • 35,235
  • 5
  • 20
  • 53