Learn R Programming

ggtern (version 1.0.2.0)

convenience: Theme Convenience Functions

Description

ggtern has made available a number of convenience functions for rapid tweaking of the various theme elements, for a full list of the available theme elements which can be manually modified, see HERE.

Arguments

Default Themes

Default themes which ship with ggtern:

Manual Modification

For manual modification on a per-element basis:

Examples

Run this code
#Load data and create the base plot.
data(Feldspar)
plot <- ggtern(data=Feldspar,aes(x=An,y=Ab,z=Or)) + geom_point()

#Default Themes
plot + theme_rgbg()
plot + theme_rgbw()
plot + theme_bw()
plot + theme_gray()

#Show or Hide Arrows
plot + theme_showarrows()
plot + theme_noarrows()

#Major/Minor Grids?
plot + theme_nogrid_minor()
plot + theme_nogrid_major()
plot + theme_nogrid()

#Clockwise/Anticlockwise Precession
plot + theme_clockwise()
plot + theme_anticlockwise()

#Ticks Inside or Outside
plot + theme_ticksoutside()
plot + theme_ticksinside()

#Show/Hide BOTH Primary and Secondary Ticks
plot + theme_showticks()
plot + theme_hideticks()

#Show/Hide EITHER Primary OR Secondary Ticks.
plot + theme_showprimary() + theme_hidesecondary()
plot + theme_hideprimary() + theme_showsecondary()

#Atomic / Weight Percent
plot + theme_showarrows() + atomic_percent()
plot + theme_showarrows() + weight_percent()

Run the code above in your browser using DataLab