Fix zlib usage with TNG
[alexxy/gromacs.git] / docs / old-html / online / xpm.html
1 <title>xpm file format</title>
2 <H3>Description</H3>
3 The GROMACS xpm file format is compatible with the XPixMap format
4 and is used for storing matrix data.
5 Thus GROMACS xpm files can be viewed directly with programs like XV.
6 Alternatively, they can be imported into GIMP and scaled to 300 DPI,
7 using strong antialiasing for font and graphics.
8 The first matrix data line in an xpm file corresponds to the last matrix
9 row. 
10 In addition to the XPixMap format, GROMACS xpm files may contain
11 extra fields. The information in these fields is used when converting
12 an xpm file to EPS with 
13 <A HREF="../programs/gmx-xpm2ps.html">gmx xpm2ps</a>.
14 The optional extra field are:
15 <ul>
16 <li>
17 Before the <tt>gv_xpm</tt> declaration:  <tt>title</tt>, <tt>legend</tt>, 
18 <tt>x-label</tt>, <tt>y-label</tt> and <tt>type</tt>,
19 all followed by a string.
20 The <tt>legend</tt> field determines the legend title.
21 The <tt>type</tt> field must be followed by <tt>"continuous"</tt> or
22 <tt>"discrete"</tt>,
23 this determines which type of legend will be drawn in an EPS file,
24 the default type is continuous.   
25 <li>
26 The xpm colormap entries may be followed by a string, which is a label for
27 that color.
28 <li>
29 Between the colormap and the matrix data, the fields 
30 <tt>x-axis</tt> and/or <tt>y-axis</tt>
31 may be present followed by the tick-marks for that axis.
32 </ul>
33 The example GROMACS xpm file below contains all the extra fields.
34 The C-comment delimiters and the colon in the extra fields are optional.   
35 <pre>
36 /* XPM */
37 /* This matrix is generated by g_rms. */
38 /* title:   "Backbone RMSD matrix" */
39 /* legend:  "RMSD (nm)" */
40 /* x-label: "Time (ps)" */
41 /* y-label: "Time (ps)" */
42 /* type:    "Continuous" */
43 static char * gv_xpm[] = {
44 "13 13   6 1",
45 "A  c #FFFFFF " /* "0" */,
46 "B  c #CCCCCC " /* "0.0399" */,
47 "C  c #999999 " /* "0.0798" */,
48 "D  c #666666 " /* "0.12" */,
49 "E  c #333333 " /* "0.16" */,
50 "F  c #000000 " /* "0.2" */,
51 /* x-axis:  0 40 80 120 160 200 240 280 320 360 400 440 480 */
52 /* y-axis:  0 40 80 120 160 200 240 280 320 360 400 440 480 */
53 "FEDDDDCCCCCBA",
54 "FEDDDCCCCBBAB",
55 "FEDDDCCCCBABC",
56 "FDDDDCCCCABBC",
57 "EDDCCCCBACCCC",
58 "EDCCCCBABCCCC",
59 "EDCCCBABCCCCC",
60 "EDCCBABCCCCCD",
61 "EDCCABCCCDDDD",
62 "ECCACCCCCDDDD",
63 "ECACCCCCDDDDD",
64 "DACCDDDDDDEEE",
65 "ADEEEEEEEFFFF"
66 </pre>