proto_default: Wrapper function for default 2D/1D tours respectively.

Description Usage Arguments See Also Examples

View source: R/2_ggproto_visualize.r

Description

An easier way to get to default 2D tour settings. Returns a list of proto_origin(), proto_point(...), proto_basis() for 2D. Returns a list of proto_origin1d(), proto_density(...), proto_basis1d() for 1D.

Usage

1
2
3
proto_default(aes_args = list(), identity_args = list(alpha = 0.9))

proto_default1d(aes_args = list(), identity_args = list(alpha = 0.7))

Arguments

aes_args

A list of aesthetic arguments to passed to geom_point(aes(X). Any mapping of the data to an aesthetic, for example, geom_point(aes(color = myCol, shape = myCol)) becomes aes_args = list(color = myCol, shape = myCol).

identity_args

A list of static, identity arguments passed into geom_point(), but outside of aes(), for instance geom_point(aes(...), size = 2, alpha = .7) becomes identity_args = list(size = 2, alpha = .7).

See Also

Other ggtour proto: filmstrip(), ggtour(), proto_basis(), proto_density(), proto_hex(), proto_highlight(), proto_origin(), proto_point(), proto_text()

Other ggtour proto: filmstrip(), ggtour(), proto_basis(), proto_density(), proto_hex(), proto_highlight(), proto_origin(), proto_point(), proto_text()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
dat <- scale_sd(tourr::flea[, 1:6])
clas <- tourr::flea$species

## 2D case:
bas <- basis_pca(dat)
mv <- manip_var_of(bas)
mt_path <- manual_tour(bas, mv)

ggt <- ggtour(mt_path, dat) +
  proto_default(list(color = clas, shape = clas))
## Not run: 
animate_plotly(ggt)
## End(Not run)
## 1D case:
gt_path <- tourr::save_history(dat, grand_tour(d = 1), max_bases = 3)

ggt <- ggtour(gt_path, dat) +
  proto_default1d(list(fill = clas, color = clas))
## Not run: 
animate_plotly(ggt)
## End(Not run)

spinifex documentation built on Sept. 28, 2021, 5:09 p.m.