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