R - Scatterplot

Card Puncher Data Processing

About

Data Visualisation - Scatterplot

Matrix

  • Useful way to see all plots for a two-class variable
pairs(dataframe,col=dataframe$TwoClassVariable)

Package

Graphics

  • Standard scatterplot
plot(data$variable1 ~ data$variable2)
  • Standard scatterplot with regression line
abline(lm(data$variable1 ~ data$variable2), col = "green")
  • Scatterplot matrix
pairs(~data$variable1 + data$variable2 + data$variable3, cex.labels = 1.2)

gclus

  • Color scatterplot matrix, colored and ordered by magnitude of r
base <- data[3:8]
base.r <- abs(cor(base))
base.color <- dmat.color(base.r)
base.order <- order.single(base.r) 
cpairs(base, base.order, panel.colors = base.color, gap = .5,
       main = "Variables Ordered and Colored by Correlation")

rgl

  • Scatterplot in 3D
plot3d(data$variable2, data$variable3, data$variable1, main = "3D Plot")

ggplot

Scatterplot:





Discover More
Division
Data Mining - (Descriptive|Discovery) (Analysis|Statistics)

Descriptive analysis is also known as Descriptive statistics They are procedures used to summarize, organize, and simplify data. Descriptive function are always unsupervised See also . Visual...
Card Puncher Data Processing
R - Simple Linear Regression

simple linear regression with R function such as lm Unstandardized Simple Regression Regression analyses, standardized (in the z scale). In simple regression, the standardized regression coefficient...



Share this page:
Follow us:
Task Runner