myDF = read.delim("http://www.kktg.net/R/Chapter2Data.txt",
header = TRUE, # Data has headers for var names
colClasses = c("character", # Set storage modes of variables
"numeric", "numeric", "numeric", # This is just a convenience and
"numeric", "factor", "numeric")) # could be adjusted afterwards
png(filename = "illustrations/fig-2-3-femlife GDPc plot.png",
units = "in", # Set measurements in inches
res = 1200, # Set resolution at 1200dpi
width = 6, # Width at 6 inches
height = 4) # Height at 4 inches
par(mai = c(1, 1, .25, .25)) # Set margins - no Title
plot(myDF$GDPc, myDF$FemLife) # Plot: femlife by GDPc
dev.off() # Output png file
Figure 2-3: A Default Scatterplot
Portfolio Categories: All Graphics and SGR Book Graphics.