#*****************************************************************************80 # ## temperature_scatter3d creates a 3D scatter plot of temperature reading stations. # # Discussion: # # This function requires the scatterplot3d library. To install it, start R # and type: # # install.packages ( "scatterplot3d" ) # # Licensing: # # This code is distributed under the MIT license. # # Modified: # # 31 August 2020 # # Author: # # John Burkardt # library ( scatterplot3d ) cat ( date ( ), "\n" ) cat ( "\n" ) cat ( "temperature_scatter3d\n" ) cat ( " ", version$version.string, "\n" ) cat ( " Create a 3D scatter plot of longitude\n" ) cat ( " latitude, and January temperature.\n" ); filename = "temperature_data.txt" tll <- read.table ( filename, header = FALSE ) filename = "temperature_scatter3d.png" png ( filename ) scatterplot3d ( tll[,1], tll[,2], tll[,3], xlab = "<-- Longitude -->", ylab = "<-- Latitude -->", zlab = "<-- January temperature -->", main = "Location of January Temperature Readings" ) grid ( ) cat ( ' Graphics saved as "', filename, '"\n' ) # # Terminate. # cat ( "\n" ) cat ( "temperature_scatter3d:\n" ) cat ( " Normal end of execution.\n" ) quit ( )