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$";
40 #ident "@(#) xvgr.h 1.8 7/28/97"
41 #endif /* HAVE_IDENT */
51 /***************************************************
53 ***************************************************/
55 elNone, elSolid, elDotted, elDashed,
56 elLongDashed, elDotDashed, elNR
58 /* xvgr line-styles */
61 ecWhite, ecFrank, ecBlack=ecFrank,
62 ecRed, ecGreen, ecBlue, ecYellow, ecBrown, ecGray,
63 ecPurple, ecLightBlue, ecViolet, ecHolland, ecLila, ecDarkGray,
64 ecAquamarine, ecOlive, ecNR
66 /* xvgr line-colors */
69 eppNone, eppColor, eppPattern, eppNR
71 /* xvgr pattern type */
78 /***************************************************
80 ***************************************************/
82 extern FILE *xvgropen(char *fn,char *title,char *xaxis,char *yaxis);
83 /* Open a file, and write a title, and axis-labels in Xvgr format */
85 /*extern void xvgr_file(char *fn,char *opts);*/
86 /* ! - - - DEPRECATED - - - !
87 * use do_view now instead!
88 * optional support for xmgrace now via env. GMX_VIEW_XVG
89 * see viewit.c/.h (gmxlib)
90 * Starts xvgr with a file fn in the background,
91 * opts (options to xvgr) may be NULL
94 extern void xvgr_view(FILE *out,real xmin,real ymin,real xmax,real ymax);
95 /* Set the view in xvgr */
97 extern void xvgr_world(FILE *out,real xmin,real ymin,real xmax,real ymax);
98 /* Set the world in xvgr */
100 extern void xvgr_legend(FILE *out,int nsets,char *setname[]);
101 /* Make a legend box, and also modifies the view to make room for the legend */
103 extern void xvgr_line_props(FILE *out,int NrSet,int LineStyle,int LineColor);
104 /* Set xvgr line styles and colors */
106 extern void xvgr_box(FILE *out,
108 real xmin,real ymin,real xmax,real ymax,
109 int LineStyle,int LineWidth,int LineColor,
110 int BoxFill,int BoxColor,int BoxPattern);
113 extern int read_xvg(char *fn,real ***y,int *ny);
114 /* Read an xvg file for post processing. The number of rows is returned
115 * fn is the filename, y is a pointer to a 2D array (to be allocated by
116 * the routine) ny is the number of columns (including X if appropriate)
119 extern void write_xvg(char *fn,char *title,int nx,int ny,real **y,char **leg);
120 /* Write a two D array (y) of dimensions nx rows times
121 * ny columns to a file. If leg != NULL it will be written too.
124 /****************************************************
125 * Some statistics utilities
126 ****************************************************/
127 extern void lsq_y_ax(int n, real x[], real y[], real *a);
128 /* Fit a straight line y=ax thru the n data points x,y. */
130 extern real lsq_y_ax_b(int n, real x[], real y[], real *a, real *b);
131 /* Fit a straight line y=ax+b thru the n data points x,y.
132 * Returns the "fit quality" sigma = sqrt(chi^2/(n-2)).