Base R graphics are quick for exploration. plot(x, y) for scatter, hist() for distribution, boxplot() for group comparisons. Customise with col, pch, cex, main, xlab, ylab. Use par(mfrow = c(r, c)) for multipanel layouts.
x <- rnorm(100)
y <- 2 * x + rnorm(100, sd = 0.5)
# Scatter plot
plot(x, y,
col = "steelblue", pch = 16, cex = 0.8,
main = "X vs Y", xlab = "X", ylab = "Y")
abline(lm(y ~ x), col = "red", lwd = 2) # regression line
# Histogram
hist(x, breaks = 20, col = "lightblue", border = "white",
main = "Distribution of X", xlab = "X")
# Boxplot by group
group <- rep(c("A","B","C"), each = 33)[1:100]
boxplot(x ~ group, col = c("#2980b9","#27ae60","#e67e22"),
main = "X by group", xlab = "Group", ylab = "X")
# Multi-panel
par(mfrow = c(1, 2))
hist(x, main = "X"); hist(y, main = "Y")
par(mfrow = c(1, 1)) # reset
# Save to file
pdf("figures/myplot.pdf", width = 8, height = 5)
plot(x, y, col = "steelblue", pch = 16)
dev.off()