Graphics Reference
In-Depth Information
Solution
size
):
ggplot(PlantGrowth, aes(x
=
group, y
=
weight, fill
=
group))
+
geom_boxplot()
+
guides(fill
=
guide_legend(title
=
NULL
NULL
))
Figure 10-12. Box plot with no legend title
Discussion
It is also possible to control the legend title when specifying the scale. This has the same effect
as the preceding code:
scale_fill_hue(guide
=
guide_legend(title
=
NULL
NULL
))