#*****************************************************************************80 # ## snowfall_plot plots yearly snowfall data. # # Licensing: # # This code is distributed under the MIT license. # # Modified: # # 21 August 2020 # # Author: # # John Burkardt # cat ( date ( ), "\n" ) cat ( "\n" ) cat ( "snowfall_plot\n" ) cat ( " ", version$version.string, "\n" ) cat ( " Make a line plot of snowfall data.\n" ) filename = "snowfall_data.txt" data <- read.table ( filename, header = FALSE ) year = data[,1] inches = data[,10] filename = "snowfall_plot.png" png ( filename ) plot ( year, inches, xlab = "Year", ylab = "Total Snow in Inches", main = "Yearly Snowfall at Michigan Tech", type = 'l', col = 'blue', lwd = 3 ) grid ( ) cat ( ' Graphics saved as "', filename, '"\n' ) # # Terminate. # cat ( "\n" ) cat ( "snowfall_plot\n" ) cat ( " Normal end of execution.\n" ) quit ( )