#*****************************************************************************80 # ## orbital_fill_contour makes a contour plot of a set of tabular Z(X,Y) data # # Discussion: # # The data represents values on a 101x101 grid over [0,4*pi]x[0,4*pi] # for a function which computes the minimum distance d # between two planets for certain orbital angles t1 and t2. # # Licensing: # # This code is distributed under the MIT license. # # Modified: # # 30 August 2020 # # Author: # # John Burkardt # cat ( "\n" ) cat ( "orbital_fill_contour:\n" ) cat ( " ", version$version.string, "\n" ) cat ( " Make a filled contour plot of a table of data Z(X,Y).\n" ) # # Read the data. # filename = 'orbital_data.txt' data <- read.table ( file = filename, header = FALSE ) # # X and Y are only expected to be vectors, in increasing order. # # Z is a full matrix. # x = data[1:101,1] y = x dim = c ( 101, 101 ) z.matrix <- array ( data[,3], dim ) filename = 'orbital_fill_contour.png' png ( filename ) filled.contour ( x, y, z.matrix, nlevels = 10, main = "Fill contour plot of orbitals", xlab = "<-- X -->", ylab = "<-- Y -->" ) cat ( "\n" ) cat ( " Graphics saved as '", filename, "'\n" ) # # Terminate. # cat ( "\n" ) cat ( "orbital_fill_contour:\n" ) cat ( " Normal end of execution.\n" ) quit ( )