xxxxxxxxxx
# 1. Open jpeg file
jpeg("rplot.jpg", width = 350, height = "350")
# 2. Create the plot
plot(x = my_data$wt, y = my_data$mpg,
pch = 16, frame = FALSE,
xlab = "wt", ylab = "mpg", col = "#2E9FDF")
# 3. Close the file
dev.off()
xxxxxxxxxx
# Open a pdf file
pdf("rplot.pdf")
# 2. Create a plot
plot(x = my_data$wt, y = my_data$mpg,
pch = 16, frame = FALSE,
xlab = "wt", ylab = "mpg", col = "#2E9FDF")
# Close the pdf file
dev.off()