data(Lsun3D)
Classplot(Lsun3D$Data[,1],Lsun3D$Data[,2],Lsun3D$Cls)
#ggplot 2 with different symbols
Classplot(
Lsun3D$Data[, 1],
Lsun3D$Data[, 2],
Lsun3D$Cls,
Plotter = "ggplot2",
Size = 3,
pch = Lsun3D$Cls + 5
)
#plotly with line
data(Lsun3D)
Classplot(Lsun3D$Data[,1],Lsun3D$Data[,2],Lsun3D$Cls,
LineType="-",LineColor = "green")
# \donttest{
#ggplot2 with annotations
data(Lsun3D)
ind=sample(1:nrow(Lsun3D$Data),20)
Classplot(Lsun3D$Data[ind,1],Lsun3D$Data[ind,2],Lsun3D$Cls[ind],
Names = rownames(Lsun3D$Data)[ind],Size =1,
Plotter = "ggplot2",AnnotateIt = TRUE)
#non 1:k ordered sequence
#of user specific colors
Colors=c("blue","green","red")
names(Colors)=c(3,2,1) #non 1:k ordering
Classplot(Lsun3D$Data[ind,1],Lsun3D$Data[ind,2],Lsun3D$Cls[ind],
Names = rownames(Lsun3D$Data)[ind],Size =1,
Plotter = "ggplot2",AnnotateIt = TRUE,Colors=Colors)
#if named vector is used, user is
#allowed to define more colors than labels
#given for current plot in case of
#multiple plots with standardized labels
Colors=c("blue","green","red","yellow")
names(Colors)=c(1,2,3,4) #1:(k+1) ordering
Classplot(Lsun3D$Data[ind,1],Lsun3D$Data[ind,2],Lsun3D$Cls[ind],
Names = rownames(Lsun3D$Data)[ind],Size =1,
Plotter = "ggplot2",AnnotateIt = TRUE,Colors=Colors)
# }
# \donttest{
#ggplot2 with labels and legend per class
data(Lsun3D)
Classplot(Lsun3D$Data[,1],Lsun3D$Data[,2],Lsun3D$Cls,
Names = paste0("C",Lsun3D$Cls),Size =2,Legend ="Classes")
# }
Run the code above in your browser using DataLab