Convenience functions to make 3D scatterplot with plotly.

plot_3D(
  data,
  by = NULL,
  text = NULL,
  title = "3D scatterplot",
  add.space = 0.2,
  scene = list(camera = list(eye = list(x = 1.1, y = -1.1, z = 1)))
)

mds2mat(fit)

SMACOF2mat(fit)

tSNE2mat(fit)

make_3D(df, title = NULL, scene = list(), add.space = 0.2)

Arguments

data

Matrix with 3 columns (size Nx3).

by

(Nx1 vector) grouping variable group with names for each row in data.

text

(Nx1 vector) charter vector with text hor each row in data.

title

The main title of the plot.

add.space

(numeric) fraction of space to be added (value between 0 and 1). Default is 0.2, i.e. 10%.

scene

Description in https://plot.ly/r/reference/#scatter3d-scene specification of parameters in https://plot.ly/r/reference/#layout-scene.

fit

An object drim which Nx3 matrix will be extracted. The object is created with one of the following functions
cmdscale, ISOmap, sammon or similar for mds2mat();
mds in SMACOF for SMACOF2mat();
Rtsne in Rtsne for tSNE2mat().

df

A data frame with variables named $x, $y, $z, $x, $text, $group.

Value

plotly object.

Examples


## NOT YET INCLUDED