#! /usr/bin/env python3 # def orbital_fill_contour ( ): #*****************************************************************************80 # ## orbital_fill_contour() creates a color contour plot of orbital data. # # Licensing: # # This code is distributed under the MIT license. # # Modified: # # 03 September 2026 # # Author: # # John Burkardt # import numpy as np import platform print ( '' ) print ( 'orbital_fill_contour():' ) print ( ' numpy version: ' + np.version.version ) print ( ' python version: ' + platform.python_version ( ) ) print ( ' Color contour plot of orbital data using gnuplot().' ) command_filename = 'orbital_commands.txt' command_unit = open ( command_filename, 'wt' ) command_unit.write ( '# ' + command_filename + '\n' ) command_unit.write ( '#\n' ) command_unit.write ( '# Usage:\n' ) command_unit.write ( '# gnuplot < ' + command_filename + '\n' ) command_unit.write ( '#\n' ) command_unit.write ( 'set term png\n' ) command_unit.write ( 'set output "orbital_fill_contour.png"\n' ) command_unit.write ( 'set xlabel "<--- X --->"\n' ) command_unit.write ( 'set ylabel "<--- Y --->"\n' ) command_unit.write ( 'set title "Orbital Data"\n' ) command_unit.write ( 'set grid\n' ) command_unit.write ( 'set timestamp\n' ) command_unit.write ( 'unset surface\n' ) command_unit.write ( 'unset key\n' ) command_unit.write ( 'set contour base\n' ) command_unit.write ( 'set view map\n' ) command_unit.write ( 'set pm3d\n' ) command_unit.write ( 'splot "orbital_data.txt" with pm3d\n' ) command_unit.write ( 'quit\n' ) command_unit.close ( ) print ( ' Created command file "' + command_filename + '"' ) # # Terminate. # print ( '' ) print ( 'orbital_fill_contour():' ) print ( ' Normal end of execution.' ) return def timestamp ( ): #*****************************************************************************80 # ## timestamp() prints the date as a timestamp. # # Licensing: # # This code is distributed under the MIT license. # # Modified: # # 21 August 2019 # # Author: # # John Burkardt # import time t = time.time ( ) print ( time.ctime ( t ) ) return if ( __name__ == '__main__' ): timestamp ( ) orbital_fill_contour ( ) timestamp ( )