next up previous contents
Next: 2.5 Saving data sets Up: 2. Plotting 1D data Previous: 2.3 Fonts and special

   
2.4 Drawing bonds

The program KUPLOT allows the user to connect points in the plot that are separated by a given distance. The distance is specified relative to the current x-axis. To calculate the distances, the aspect ratio and the angle between the axes is used. These values can be defined by the user via the commands 'aver' and 'angl' as we will discuss in somewhat more detail in section 3.2. Consequently you will get the desired connection only for the correct aspect ratio and angle between the axes. This feature can be used to include bonds when plotting a structure file exported by DISCUS. An example for the compound PHTP (Perhydrotriphenylen) is shown in Figure 2.6. The macro file used to create this picture is listed below:

      1  rese
      2  load cr,phtp.cr
      3  #
      4  skal 0.0,28.8,0.0,28.8
      5  mark 14.4,14.4
      6  #
      7  aver 1.0
      8  angl 120.0
      9  #
     10  msiz 1,0.35
     11  grid on
     12  fnam off
     13  #
     14  achx a-axis (\A)
     15  achy b-axis (\A)
     16  #
     17  bond 1,1.4,0.2,1,1,1.5
     18  #
     19  plot

First we reset the program and read the data (line 2). In line 4 the plot area is defined followed by the setting for the tick mark interval (line 5). In our case the lattice parameter is a=b=14.4Å. The command 'aver' defines the ratio between units on the y- and x-axis. Since both are in Å, the desired ratio is one. The angle between the axes is set to 120$^{\circ}$ (line 8). Next we set the marker size (line 10), turn the plotting of the grid on (line 11) and disable the plotting of the filenames (line 12). The axes labels are set in lines 14 and 15. So far nothing new, now comes the command 'bond' that defines the bonds between carbon atoms we like to plot. The first parameter '1' is the number of the bond definition. KUPLOT allows one to define multiple distances. The second and third parameter set the distance to 1.4Å $\pm 20$%. The last optional parameters in line 17 set the bond colour to red (pen 1), select a solid line (type 1) and set the line width to 1.5. All that remains is to plot the result (line 19). One should be aware that KUPLOT calculates the distances between all data points and compares the to the selected distance interval which can be rather slow for large data file. To disable a bond definition simply reenter the command with distance zero, e.g. 'bond 1,0.0'.


  
Figure 2.6: Example for plotting bonds
\includegraphics[scale=0.5, angle=270.0]{pl1.6.eps}


next up previous contents
Next: 2.5 Saving data sets Up: 2. Plotting 1D data Previous: 2.3 Fonts and special
Thomas Proffen {Billinge}
1999-06-26