#*****************************************************************************80 # ## nile_plot makes a line plot of yearly flood levels for the Nile. # # Licensing: # # This code is distributed under the MIT license. # # Modified: # # 18 August 2020 # # Author: # # John Burkardt # cat ( date ( ), "\n" ) cat ( "\n" ) cat ( "nile_plot\n" ) cat ( " ", version$version.string, "\n" ) cat ( " Make a line plot of yearly Nile flood levels.\n" ) filename = "nile_data.txt" data <- read.table ( filename, header = FALSE ) height = data[,2] filename = "nile_plot.png" png ( filename ) plot ( data[,1], data[,2], xlab = "Year", ylab = "Height of Nile at Maximum Flood", main = "Yearly Nile Flood Height", type = 'l', col = 'green' ) grid ( ) cat ( ' Graphics saved as "', filename, '"\n' ) # # Terminate. # cat ( "\n" ) cat ( "nile_plot\n" ) cat ( " Normal end of execution.\n" ) quit ( )