#*****************************************************************************80 # ## automobile_scatter reads the automobile dataset and makes a scatterplot. # # Licensing: # # This code is distributed under the MIT license. # # Modified: # # 26 August 2020 # # Author: # # John Burkardt # # Reference: # # A Frank, A Asuncion, # UCI Machine Learning Repository, # http://archive.ics.uci.edu/ml, # School of Information and Computer Science, # University of California, Irvine, California. # cat ( date ( ), "\n" ) cat ( "\n" ) cat ( "automobile_scatter\n" ) cat ( " ", version$version.string, "\n" ) cat ( " Read a data file of automobile prices and weights." ) cat ( " Make a scatter plot of pairs of data." ) filename = "automobile_data.txt" data <- read.table ( filename, header = FALSE ) filename = "automobile_scatter.png" png ( filename ) plot ( data[,1], data[,2], xlab = "Price in 1985 Dollars", ylab = "Curb weight in pounds", main = "1985 car price versus weight", col = "blue" ) grid ( ) cat ( ' Graphics saved as "', filename, '"\n' ) # # Terminate. # cat ( "\n" ) cat ( "automobile_scatter\n" ) cat ( " Normal end of execution.\n" ) quit ( )