iris2D | R Documentation |
A 2-dimensional version of the well-known iris
dataset. It maintains the
attributes Petal.Length
and Petal.Width
, which give the measurements in centimeters of
the petal length and width of iris flowers belonging to three different species (setosa, versicolor and
virginica). Duplicate and contradictory samples are removed from the dataset, resulting in a total
of 103 samples.
data(iris2D)
A data.frame with 103 samples (rows) and 3 variables (columns) named Petal.Length, Petal.Width and Species.
Data collected by E. Anderson (1935).
R. A. Fisher. The use of multiple measurements in taxonomic problems. Annals of Eugenics, 7:179-188, 1936.
E. Anderson. The irises of the Gaspe Peninsula. Bulletin of the American Iris Society, 59:2-5, 1935.
sym_uni_ln
, sym_uni_an
, print.ndmodel
, summary.ndmodel
, plot.ndmodel
library(ggplot2) library(RColorBrewer) data(iris2D) ggplot(data = iris2D, aes(x = iris2D[,1], y = iris2D[,2], color = iris2D[,3])) + geom_point(stroke = 0.5) + xlim(min(iris2D[,1]), max(iris2D[,1])) + ylim(min(iris2D[,2]), max(iris2D[,2])) + xlab(names(iris2D)[1]) + ylab(names(iris2D)[2]) + labs(color='Species') + scale_color_manual(values = brewer.pal(3, "Dark2")) + theme(panel.border = element_rect(colour = "black", fill=NA), aspect.ratio = 1, axis.text = element_text(colour = 1, size = 12), legend.background = element_blank(), legend.box.background = element_rect(colour = "black"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.