Ggplot - Color

Ggplot Graphic Plot

About

Colour is an aesthetic (plot parameter) that changes the bar outline color.

See also:

  • fill to change the interior colouring.
  • alpha for the transparency

Format

Name

A name, e.g., “red”. R has 657 built-in named colours, which can be listed with colours(). The Stowers Institute provides a nice printable pdf that lists all colours.

Rgb

An rgb specification, with a string of the form “#RRGGBB” where each of the pairs RR, GG, BB consists of two hexadecimal digits giving a value in the range 00 to FF

You can optionally make the colour transparent by using the form #RRGGBBAA

Transparent colour (NA)

An NA, for a completely transparent colour.

Documentation / Reference





Discover More
Ggplot Graphic Plot
GGplot - Position

positions Value Desc identity don't do anything “stack” requires non-overlapping x intervals for creating side-by-side barcharts - with a fill or color aesthetic supplied for aligning...
Ggplot Scale Coordinate System
GGplot - Scale (Data Transformation)

Scales control the mapping between data and aesthetics, and control the display of the matching guide (axis or legend) Ex: Linear scaling of x and y axes (scales) See: scale_continuous, scale_discrete,...
Ggplot Aes Mapping
Ggplot - (aes|aesthetic) (plot parameter definition)

Aesthetic are plots parameters that are given by the data. For parameters that are not related to the data, see Such as: coordinate x and y. Color: color: the bar outline, fill: interior colouring...
Ggplot Graphic Plot
Ggplot - Fill aesthetic

Fill in Ggplot Fill is an aesthetic and changes the interior coloring. See: color for the bar outline alpha for the transparency



Share this page:
Follow us:
Task Runner