4 * This source code is part of
8 * GROningen MAchine for Chemical Simulations
12 * Copyright (c) 1991-1999
13 * BIOSON Research Institute, Dept. of Biophysical Chemistry
14 * University of Groningen, The Netherlands
17 * GROMACS: A message-passing parallel molecular dynamics implementation
18 * H.J.C. Berendsen, D. van der Spoel and R. van Drunen
19 * Comp. Phys. Comm. 91, 43-56 (1995)
21 * Also check out our WWW page:
22 * http://md.chem.rug.nl/~gmx
27 * Green Red Orange Magenta Azure Cyan Skyblue
33 static char *SRCID_xvgr_h
= "$Id$";
36 #ident "@(#) xvgr.h 1.8 7/28/97"
37 #endif /* HAVE_IDENT */
45 /***************************************************
47 ***************************************************/
48 extern FILE *xgopen(char *fn
,char *header
,char *title
,char *xaxis
,char *yaxis
);
49 /* Open a file, and write a title, and axis-labels in XGraph format */
51 extern void xgraph_file(char *fn
,char *opts
);
52 /* Starts xgraph with a file fn in the background,
53 * opts (options to xgraph) may be NULL
56 /***************************************************
58 ***************************************************/
60 elNone
, elSolid
, elDotted
, elDashed
,
61 elLongDashed
, elDotDashed
, elNR
63 /* xvgr line-styles */
66 ecWhite
, ecFrank
, ecBlack
=ecFrank
,
67 ecRed
, ecGreen
, ecBlue
, ecYellow
, ecBrown
, ecGray
,
68 ecPurple
, ecLightBlue
, ecViolet
, ecHolland
, ecLila
, ecDarkGray
,
69 ecAquamarine
, ecOlive
, ecNR
71 /* xvgr line-colors */
74 eppNone
, eppColor
, eppPattern
, eppNR
76 /* xvgr pattern type */
83 /***************************************************
85 ***************************************************/
87 extern FILE *xvgropen(char *fn
,char *title
,char *xaxis
,char *yaxis
);
88 /* Open a file, and write a title, and axis-labels in Xvgr format */
90 extern void xvgr_file(char *fn
,char *opts
);
91 /* Starts xvgr with a file fn in the background,
92 * opts (options to xvgr) may be NULL
95 extern void xvgr_view(FILE *out
,real xmin
,real ymin
,real xmax
,real ymax
);
96 /* Set the view in xvgr */
98 extern void xvgr_world(FILE *out
,real xmin
,real ymin
,real xmax
,real ymax
);
99 /* Set the world in xvgr */
101 extern void xvgr_legend(FILE *out
,int nsets
,char *setname
[]);
102 /* Make a legend box, and also modifies the view to make room for the legend */
104 extern void xvgr_line_props(FILE *out
,int NrSet
,int LineStyle
,int LineColor
);
105 /* Set xvgr line styles and colors */
107 extern void xvgr_box(FILE *out
,
109 real xmin
,real ymin
,real xmax
,real ymax
,
110 int LineStyle
,int LineWidth
,int LineColor
,
111 int BoxFill
,int BoxColor
,int BoxPattern
);
114 extern int read_xvg(char *fn
,real
***y
,int *ny
);
115 /* Read an xvg file for post processing. The number of rows is returned
116 * fn is the filename, y is a pointer to a 2D array (to be allocated by
117 * the routine) ny is the number of columns (including X if appropriate)
120 extern void dump_xvg(char *fn
,char *title
,int nx
,int ny
,real
**y
);
121 /* Quicly dump a two D array (y) of dimensions nx rows times
122 * ny columns to a file.
125 /***************************************************
127 ***************************************************/
128 extern void xv_file(char *fn
,char *opts
);
129 /* View a file using xv */
131 /****************************************************
132 * Some statistics utilities
133 ****************************************************/
134 extern void lsq_y_ax(int n
, real x
[], real y
[], real
*a
);
135 /* Fit a straight line y=ax thru the n data points x,y */
137 extern void lsq_y_ax_b(int n
, real x
[], real y
[], real
*a
, real
*b
);
138 /* Fit a straight line y=ax+b thru the n data points x,y */