changed reading hint
[gromacs/adressmacs.git] / include / xvgr.h
blobbd36631b611a743bbc1073e138363dbbfa719d9d
1 /*
2 * $Id$
3 *
4 * This source code is part of
5 *
6 * G R O M A C S
7 *
8 * GROningen MAchine for Chemical Simulations
9 *
10 * VERSION 2.0
12 * Copyright (c) 1991-1999
13 * BIOSON Research Institute, Dept. of Biophysical Chemistry
14 * University of Groningen, The Netherlands
16 * Please refer to:
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
23 * or e-mail to:
24 * gromacs@chem.rug.nl
26 * And Hey:
27 * Green Red Orange Magenta Azure Cyan Skyblue
30 #ifndef _xvgr_h
31 #define _xvgr_h
33 static char *SRCID_xvgr_h = "$Id$";
35 #ifdef HAVE_IDENT
36 #ident "@(#) xvgr.h 1.8 7/28/97"
37 #endif /* HAVE_IDENT */
39 #ifdef CPLUSPLUS
40 extern "C" {
41 #endif
43 #include "sysstuff.h"
44 #include "typedefs.h"
45 /***************************************************
46 * XGraph routines
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 /***************************************************
57 * XVGR DEFINITIONS
58 ***************************************************/
59 enum {
60 elNone, elSolid, elDotted, elDashed,
61 elLongDashed, elDotDashed, elNR
63 /* xvgr line-styles */
65 enum {
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 */
73 enum {
74 eppNone, eppColor, eppPattern, eppNR
76 /* xvgr pattern type */
78 enum {
79 evView, evWorld, evNR
81 /* view type */
83 /***************************************************
84 * XVGR ROUTINES
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,
108 int LocType,
109 real xmin,real ymin,real xmax,real ymax,
110 int LineStyle,int LineWidth,int LineColor,
111 int BoxFill,int BoxColor,int BoxPattern);
112 /* Make a box */
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 /***************************************************
126 * XV ROUTINES
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 */
140 #ifdef CPLUSPLUS
142 #endif
144 #endif /* _xvgr_h */