1

I'm trying to plot a legend at the bottom of a main plot area comprised of multiple small plots (4 rows x 5 columns). I figured out how to center the legend at the bottom with the aid of this answer. I'm interested in having a horizontal legend, so I tried to use legend(x="center",lbls, horiz=TRUE), which would have served my purposes - except that my labels are too long and it goes off the plot area. I decided that a 2 row x 4 column layout will work best (I have 8 labels).

However, legend(x="center",lbls, ncol = 4) fills in the columns first (i.e. top to bottom), and I'd like to fill in by row first (i.e. left to right). Is there a workaround for this that doesn't involve using multiple legends?

Community
  • 1
  • 1
blep
  • 726
  • 1
  • 11
  • 28
  • 2
    Can't you just change lbls? – Marichyasana May 15 '16 at 22:09
  • @Marichyasana I was hoping to manage without doing that, because I also have a rather complicated color vector defined for the fill, mashing subsets of three color palettes together. (Basically, I was wondering if there was an argument to legend that I'd missed, but I guess not?) – blep May 15 '16 at 22:37

0 Answers0