I am using ggplot2 to chart bunch of items in one chart. Sincere there could be 1 to 60 or greater items, Iam using
ggplot(df, aes(Date, Value, colour=item, group=item)) + geom_point(size=0.4) + guides(col = guide_legend(nrow = 30, byrow=TRUE))
to make sure I have 30 rows. If it is greater than 30 items, next legend item shows ups on the second column and so forth.
But If I have fewer items like 2 or 3, legends are overthrown from the chart window.
Is there an option to force the legend to justify vertically with ggplot?
did it for me. Since version 0.9.2,
optshas been replaced bytheme: