I am plotting 15 lines using ggplot
(package name: ggplot2), each representing a separate entity and wish to create a legend for the same. However, I am not able to divide the legend entries into more than one column. Can someone please suggest how to do the same in ggplot environment.
Presently, I am using the following command to create legend:
opts(title=plotName,legend.position='bottom')
However, this gives a one column legend. As a result a large area in the chart is taken by legend itself. Dividing it into 2 or 3 columns would really help the cause while keeping the legend at the bottom of the chart.
I also tried legend.direction
but this command displays legend in one row which is not desirable either unless I may spread it across 2-3 rows.
opts(title=plotName,legend.position='bottom',legend.direction="horizontal")
Thanks in advance, Munish