# this file ("XYZplot.gplt") is a gnuplot script for # displaying the lorenz attractor, using a data file # containing values of X, Y and Z (one triplet per # line) that are solutions to the lorenz equations, # scaled so the fixed points lie at x = y = +/- 1.0 # and z = 1.0, regardless of the parameter values # chosen for the prandtl number sigma, the rayleigh # number r, and the aspect ratio b. # # the script as written below will # produce the postscript file "XYZplot.ps" when the # command "gnuplot XYZplot.gplt" is given and then the # return key is pressed. if you want to display the # attractor in a window on your desktop, just # comment out the first two lines, and uncomment the # third ("set term X11") line. when the display # pops up on your screen you can use the mouse (or # the arrow keys) to rotate the image so as to view # it from different angles. the viewing angles are # theta (here defaulting to 86 degrees) and phi # (here defaulting to 6 degrees). theta=0 means # you're looking down the Z-axis at the X-Y plane. # the default setting shows the X-axis in front, the # Y-axis extending back into the figure, and the # Z-axis extending upwards toward the top of the # figure. # # whether you're producing the postscript file or # viewing the image on the screen, the give the command # "gnuplot XYZplot.gplt" to make it happen. # some browsers may support "gplt" as a file extension # indicating a mimeType for gnuplot: # # # # # set term post enhanced color # set term fig color # set output "XYZplot.fig" # set output "XYZplot.ps" set palette set pm3d set term X11 # if you're on a windows machine uncomment the # next line instead of "set term X11": # set term windows set pm3d at s set cbrange [0:3] set xzeroaxis set yzeroaxis unset xtics unset ytics unset ztics unset key unset colorbox # for the border, use lt 0. (lt 9 may also be nice) # the "4095-32" omits the left back vertical line of the # border box. set border 4095-32 lt 0 lw 2 set origin 0, -.05 set xlabel "X-axis" tc lt 3 set xrange [-3:3] set yrange [-3:3] set zrange [0:2] set view 79, 16, 1.0, 1.3 # set label "Lorenz Attractor" at 0,0,-0.3 center tc palette cb 0 splot 'XYZdata' with lines palette pause -1 "hit return to exit..." # set output "test.fig" # set output "test.ps" # test # pause -1 "hit return to exit..."