Learn R Programming

ggtern (version 1.0.6.1)

convenience_functions: 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

Manual Modification

For manual modification on a per-element basis:

Default Themes

Default (complete) themes which ship with ggtern:

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_rgbw()
#plot + theme_rgbg()
#plot + theme_bw()
#plot + theme_gray()
#plot + theme_custom(col.T="red",col.L="blue",col.R="black")

#Show or Hide Arrows
plot + theme_showarrows()
#plot + theme_hidearrows()
#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