#*****************************************************************************80 # ## lynx_plot creates a line plot of lynx data. # # Licensing: # # This code is distributed under the MIT license. # # Modified: # # 18 August 2020 # # Author: # # John Burkardt # cat ( "\n" ); cat ( "lynx_plot:\n" ); cat ( " ", version$version.string, "\n" ) cat ( " Make a curve by connecting a series of data points.\n" ); cat ( " Mark the data points.\n" ); filename = "lynx_data.txt" xy <- read.table ( filename, header = FALSE ) # # Plot the data. # filename = "lynx_plot.png" png ( filename ) plot ( xy[,1], xy[,2], xlab = "<--- Year --->", ylab = "<--- Lynx Harvest --->", main = "Lynx Population Records", col = "green" ) lines ( xy[,1], xy[,2], type = 'l', col = "black" ) grid ( ) cat ( "\n" ) cat ( ' Graphics saved as "', filename, '"\n' ) # # Terminate. # cat ( "\n" ) cat ( "lynx_plot\n" ) cat ( " Normal end of execution.\n" ) quit ( )