#*****************************************************************************80 # ## predator_plot3d computes time/predator/prey data and makes a 3D plot. # # Licensing: # # This code is distributed under the MIT license. # # Modified: # # 01 September 2020 # # Author: # # John Burkardt # library ( 'plot3D' ) cat ( "\n" ) cat ( "predator_plot3d:\n" ) cat ( " ", version$version.string, "\n" ) cat ( " Model the interaction between rabbits and foxes.\n" ) # # Read the data. # filename = 'predator_data.txt' trf <- read.table ( file = filename, header = FALSE ) # filename = 'predator_plot3d.png' png ( filename ) lines3D ( trf[,2], trf[,3], trf[,1], theta = 60, phi = 30, main = "Predator/prey evolution", xlab = "<-- rabbits -->", ylab = "<-- foxes -->", zlab = "<-- time -->", lwd = 3, col = "red" ) cat ( "\n" ) cat ( " Graphics saved as '", filename, "'\n" ) # # Terminate. # cat ( "\n" ) cat ( "predator_plot3d:\n" ) cat ( " Normal end of execution.\n" ) quit ( )