Available Themes

One of the great features of ggplot2, is the way in which the theme architecture has been implemented. It is very easy to ‘customize’ a plot the way that you like, and, historically, several convenience functions were provided to make it even easier, such as theme_bw() or theme_gray(). In this spirit, ggtern has also implemented some theme-based convenience functions, and the purpose of this post is to illustrate the differences.

Firstly, lets create a default plot:

plot <- ggtern(data = data.frame(x = 1, y = 1, z = 1),
               aes(x, y, z)) +

Continue to the next pages, to see some simple theme variations…

Default Gray

last_plot() + theme_gray()

plot of chunk unnamed-chunk-3

Black and White

last_plot() + theme_bw()

plot of chunk unnamed-chunk-4

Red-Green-Blue and White

last_plot() + theme_tern_rgbw()

plot of chunk unnamed-chunk-5

Red-Green-Blue and Gray

last_plot() + theme_rgbg()

plot of chunk unnamed-chunk-6

Without Grid (Minor Only Removed)

last_plot() + theme_bw() + theme_nogrid_minor()

plot of chunk unnamed-chunk-7

Without Grid (Minor AND Major Removed)

last_plot() + theme_bw() + theme_nogrid()

plot of chunk unnamed-chunk-8

Without Grid and Without Arrows

last_plot() + theme_bw() + theme_nogrid() + theme_noarrows()

plot of chunk unnamed-chunk-9

  1. marianoju
    • Nicholas Hamilton
  2. Mike Fuller
  3. Peter

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.