R Func Plot Type
# Overlay multiple types on the same plot
plot(days, temp, type ="n", # First set up coordinate system without drawing
main ="Monthly Temperature Change",
xlab ="Date", ylab ="Temperature(Β°C)",
ylim =c(0, 30))
# Add vertical lines (type = "h")
lines(days, temp, type ="h",
col="lightblue", lwd =2)
# Add points and lines
lines(days, temp, type ="o",
col="coral", lwd =2, pch =19, cex =0.6)
Executing the above code will display a temperature change chart with vertical lines and connecting lines overlaid.
[ R Language Examples](https://example.com/r/r-examples.html)
YouTip