Please enable JavaScript.
Coggle requires JavaScript to display documents.
ggplot2 (Def (Aesthetics (Size / Shape / Color), Geom (Lines / points /…
ggplot2
Def
-
-
-
-
Stats - Statistical transformations - Smoothing, binning ...
Scale
What scale an aesthetic uses ie men =blue, girls = pink
-
In ggplot, built in layers
-
Overlay a summary (smoother, regression line ...)
-
g <- ggplot(my_data,aes(x_cord,y_cord))
Can do summary(g)
-
-
geom_smooth
size, linetype, method (ie lm), en(confidence interval) = True or False
-
-
-
-
Main Functions
qplot
qplot(x.cord,y.cord, data = my_database, color = by_what)
Scatterplot Makes a colored legend (points by color)
qplot(x.cord,y.cord, data = my_database, geom=c("point","smooth")
Smooth line across points
provides a 95% conf intervals
If add ,method="lm"
(linear regression lines used)
qplot(x_cord, data =my_data, fill=by_what)
Histogram , count on y-axis
qplot(x.cord,y.cord, data = my_database, facets = .~by_what)
scatter plots in 3 diff columns
qplot(x_cord, data =my_data, facets = by_what~., binwidth =2)
Histogram in 3 diff rows
Density Curve
qplot(x_cord,data = my_data, geom = "density", color = by_what)
In scatterplot, if wanna divide by shape,
,shape=by_what
-
-