Calc.  SED & PREDOM / Plot Files

Plot-file format

Plot files have a name ending with plt”. They contain vector-type information. This means that they specify where to move a drawing device, and where to draw a line from the previous point.

Plot files are plain text files. They may be changed with a text editor.

Make it pretty: change the diagram.

Plot-file format:

Each line contains three integers (I1, I2 and I3) in positions 1 to 9. Comments may be written from position 10 to the end-of-line.

The first number in each line is an integer in position 1 (this number is called here “I1”). It may have the following values:

  I1  = 0 “move to”
= 1 “draw a line to”
= 5 “change the colour to”   (for screen display)
= 8 “change the pen number to”   (for plotters or printers)

The second number (I2) is given in position 2 to 5. The meaning of this value depents of the value of I1:

  If   I1 = 0   then:   I2 = X-coordinate in units of 0.1 mm
I1 = 1 I2 = Y-coordinate in units of 0.1 mm
I1 = 5 I2 = screen colour
I1 = 8 I2 = printer pen number

The third integer (I3) is given in positions 6 to 9. The meaning of this value also depents of the value of I1:

  If   I1 = 0   then:   I3 = X-coordinate in units of 0.1 mm
I1 = 1 I3 = Y-coordinate in units of 0.1 mm

The values of I2 and I3 must be right-adjusted, i.e., blanks may exist to the left of the value, but not to the right of it. Values in the range −999 to 9999 are possible.

For example, to draw a triangle:

  
0   0   0 Comment:
5   2      a triangle
11000   0
5   3
110001000
5   4
1   0   0
   Triangle

Several plot-file examples may be found in examples sub-directory.

 

Make it Pretty: Change the Diagram

The present versions of SED and PREDOM write information in “plt” files about the diagram and about the text labels (chemical formulas etc). This information is written as comments starting from column 10, and it is used by the programs SPANA, PlotPDF, PlotPS, etc.

With a text editor it is possible to add, delete or move text labels using the information in these comments.

Structure of the diagram: Comments starting with “-- ” indicate the start of different parts of the diagram: “-- AXIS --”, “-- HEADING --”, etc. This makes it possible to search quickly for different parts of a diagram. Taking away all lines between two such comments will remove that part of a diagram.

Text labels: They start with a comment “TextBegin” (for chemical formulas a “C” is added: “TextBeginC”). The variables “I2” and “I3” described above indicate the x- and y-coordinates. Text labels end with the comment “TextEnd”. For example:

  
011721245 TextBeginC size=   0.35 cm, angle=    0.00
0   0   0 [MoO4 2−]`TOT´ =   10.00 mM
....
0   0   0 TextEnd

will insert “[MoO42−]TOT = 10.00 mM” at x = 11.72 cm and y = 12.45 cm. It is easy to change the text, its size, to move it, etc

For chemical formulas: A special algorithm is used to determine which characters should be super- or sub-script:

Example:

  
0  50  50 TextBeginC size=   0.35 cm, angle=    0.00
0   0   0 ^H`f'~ = 5 kJ'.`mol'-1` P`CO2'= 3$bar  t=25~C
0   0   0 TextEnd
0  50 150 TextBeginC size=   0.35 cm, angle=    0.00
0   0   0 x'2` + v`i'@ - log`10'X = 1.35'.`10'-3` for Fe@35Cr
0   0   0 TextEnd

produces:

formula