, , , , limit_term(...) ( ) [0,1], [0,100%]. , , , 100% 0%.
, :
tern_limits(T=12, L=10, R=4)
, 1200%, 1000% 400% , , .
, limits_tern zoom.
library(ggtern)
n = 100
df = data.frame(id=1:n,
x=runif(n),
y=runif(n),
z=runif(n))
base = ggtern(df,aes(x,y,z,color=id)) + geom_point(size=3)
base
#Top Corner
base + limit_tern(1.0,0.5,0.5)
#Left Corner
base + limit_tern(0.5,1.0,0.5)
#Right Corner
base + limit_tern(0.5,0.5,1.0)
#Center Zoom Convenience Function
base + theme_zoom_center(0.4) # Zoom In
base + theme_zoom_center(0.6) # Zoom In
base + theme_zoom_center(0.8) # Zoom In
base + theme_zoom_center(1.0) ##Default as per no zoom
base + theme_zoom_center(1.2) # Zoom Out
base + theme_zoom_center(1.4) # Zoom Out
base + theme_zoom_center(1.6) # Zoom Out
base + theme_zoom_center(1.8) # Zoom Out
base + theme_zoom_center(2.0) # Zoom Out
#Left Zoom Convenience Function
# (try theme_zoom_R and theme_zoom_T for Right and Top respectively)
base + theme_zoom_L(0.4) # Zoom In
base + theme_zoom_L(0.6) # Zoom In
base + theme_zoom_L(0.8) # Zoom In
base + theme_zoom_L(1.0) ##Default as per no zoom
base + theme_zoom_L(1.2) # Zoom Out
base + theme_zoom_L(1.4) # Zoom Out
base + theme_zoom_L(1.6) # Zoom Out
base + theme_zoom_L(1.8) # Zoom Out
base + theme_zoom_L(2.0) # Zoom Out
:, , , ( ) scale_X_continuous (...) [X = T, L, R]. , x y , , .
, , , , T, L R. , .
ggtern() +
scale_T_continuous(limits=c(0.5,1.0),
breaks=seq(0,1,by=0.1),
labels=LETTERS[1:11]) +
scale_L_continuous(limits=c(0.0,0.5),
breaks=seq(0,1,by=0.1),
labels=LETTERS[1:11]) +
scale_R_continuous(limits=c(0.0,0.5),
breaks=seq(0,1,by=0.1),
labels=LETTERS[1:11])