Learn R Programming

Radviz (version 0.9.3)

plot.radviz: A Plotting Function for the Radviz Object

Description

Plots the Dimensional Anchors and projected data points in a 2D space.

Usage

# S3 method for radviz
plot(
  x,
  main = NULL,
  anchors.only = TRUE,
  anchors.filter = NULL,
  label.color = NULL,
  label.size = NULL,
  point.color,
  point.shape,
  point.size,
  add,
  ...
)

Arguments

x

a radviz object as produced by do.radviz

main

[Optional] a title to the graph, displayed on top

anchors.only

by default only plot the anchors so that other methods can easily be chained

anchors.filter

filter out anchors with low contributions to the projection (superseded)

label.color

the color of springs for visualization

label.size

the size of the anchors (see customizing ggplot2 for details on default value)

point.color

deprecated, use geom_point instead

point.shape

deprecated, use geom_point instead

point.size

deprecated, use geom_point instead

add

deprecated, use geom_point instead

...

further arguments to be passed to or from other methods (not implemented)

Value

the internal ggplot2 object, allowing for extra geoms to be added

Details

by default the plot function only shows the anchors. Extra geoms are required to display the data. When anchors.filter is a number and type is not Radviz, any springs whose length is lower than this number will be filtered out of the visualization. This has no effect on the projection itself. Please note that this parameter is being superseded by the anchor.filter function.

Examples

Run this code
# NOT RUN {
data(iris)
das <- c('Sepal.Length','Sepal.Width','Petal.Length','Petal.Width')
S <- make.S(das)
rv <- do.radviz(iris,S)
plot(rv)
plot(rv,anchors.only=FALSE)

library(ggplot2)
## should look the same as before
plot(rv)+geom_point()
plot(rv)+geom_point(aes(color=Species))

# }

Run the code above in your browser using DataLab