0

I created the following violin plot by appending different plots and with this lines:

windows()
mat<-(matrix(1:3,ncol=3))
layout(mat,widths = rep.int(1, ncol(mat)),heights = rep.int(1,nrow(mat)),respect =F)
layout.show(n = 3)
par(mar=c(4, 0.2, 2, 0.2), oma=c(0, 7, 0, 0.5))

enter image description here

Now I would like to add a line to the Y-axis like the one you can see in the X-axis in the following figure:

enter image description here

As you can see this line in the X-axis adds information about the continent where the samples came from.

How can I add this info to the Y-axis of my plot? Do I need to provide with more code? Thanks!

Cebs
  • 180
  • 13

1 Answers1

0

I found it quite tricky to add-on such lines, so I just import them to Inkscape and do fine-tuning there (adding lines, legends, etc.) For example, if the name of your plot is plotname, then type:

svg(filename = "myplot.svg", width = 16, height = 10)

plotname

dev.off()

Hope this is useful,