[R] ggplot - plot with only legend?
Pedro de Barros
pbarros at ualg.pt
Thu Apr 10 16:17:31 CEST 2008
Dear R'ers,
I am trying to build a composite plot (with several plots in one
figure). I have tried, but I cannot use facetting, as I need to
customize each plot using grid.
Since all the plots are the same (with different data, but same
layout and categories), I would like to have only one legend, that I
would place in its own viewport, below all the other plots. My questions are
(a) is there is a way, in ggplot, to build a plot that is only the
legend (no data), where the legend occupies the whole viewport;
(b) How can I change the layout of the legend (e.g. have them written
side-by side, instead of over each other).
Thanks in advance,
Pedro
More information about the R-help
mailing list