Skip to contents

Function to plot a scatterplot

Usage

clara_scatterplot(
  x,
  data,
  x_var,
  y_var,
  plot_all_fuzzy = TRUE,
  membership_threshold = 0,
  alpha_fuzzy = 0.4,
  focus = FALSE,
  focus_clusters = NULL,
  na.omit = FALSE
)

Arguments

x

An object of class "fuzzyclara"

data

data.frame or matrix used for clustering

x_var, y_var

Names of x and y variable

plot_all_fuzzy

For fuzzy clustering and threshold: should observations below threshold be plotted transparent? Defaults to TRUE.

membership_threshold

Threshold for fuzzy clustering observations to be plotted. Must be a number between 0 and 1. Defaults to 0.

alpha_fuzzy

Alpha value for observations below threshold, only relevant for fuzzy clustering and focus = FALSE. Defaults to 0.4.

focus

For fuzzy clustering, focus on clusters given by variable focus_clusters and plot observations based on probability of belonging to the respective cluster. Defaults to FALSE.

focus_clusters

Optional vector of integers to focus on specific clusters

na.omit

Should missing values be excluded for plotting? Defaults to FALSE.

Value

scatterplot