0

I want add the sign (a), (b), (c) to my figures. what I mean is add the (a),(b),(c) to the upper left of the graph



a<-rnorm(1000,10,1)
plot(a)

b<-rnorm(1000,10,10)
plot(b)

c<-rnorm(1000,1,1)
plot(c)

Could anyone tell me how can I add this?

Thank you

enter image description here

like this

enter image description here

hard worker
  • 181
  • 8
  • Possible duplicate: https://stackoverflow.com/questions/55084140/include-figure-labels-in-r-markdown-for-side-by-side-plots or https://stackoverflow.com/questions/38439211/figure-labels-add-text-on-graphs-in-the-same-location-despite-figure-size – MrFlick Dec 28 '20 at 04:33
  • sorry what I mean is add the (a) (b) at the upper left of the graph – hard worker Dec 28 '20 at 04:35
  • please see my new edits – hard worker Dec 28 '20 at 04:47

2 Answers2

1

If you want to use base R, you can try with mtext

a<-rnorm(1000,10,1)
plot(a)
mtext(side=3, line=0.5, '(a)', adj = 0)

enter image description here

Ronak Shah
  • 377,200
  • 20
  • 156
  • 213
1

You may be interested in the package patchwork which allows for good alignment of multiple graphs and you can add the letters via the geom_title() argument. The website for descriptions can be found: https://patchwork.data-imaginist.com/

Justin Cocco
  • 392
  • 1
  • 6