14.4 Scale guides

Scale guides are more complex than scale names: where the name argument (and labs() ) takes text as input, the guide argument (and guides()) require a guide object created by a guide function such as guide_colourbar() and guide_legend(). These arguments to these functions offer additional fine control over the guide.

The table below summarises the default guide functions associated with different scale types:

Scale type Default guide type
continuous scales for colour / fill aesthetics colourbar
binned scales for colour/fill aesthetics coloursteps
position scales (continuous, binned, and discrete) axis
discrete scales (except position scales) legend
binned scalesd (except position/colour/fill scales) bins

Each of these guide types has appeared earlier in the toolbox:

  • guide_colourbar() is discussed in Section 11.2.5

  • guide_coloursteps() is discussed in Section 11.4.2

  • guide_axis() is discussed in Section 10.3.2

  • guide_legend() is discussed in Section 11.3.6

  • guide_bins() is discussed in Section 12.1.2

In addition to the functionality discussed in those sections, the guide functions have many arguments that are equivalent to theme settings like text colour, size, font etc, but only apply to a single guide. For information about those settings, see Chapter 18.