src/GamIO/Ggnuplot1D.cc
/* These functions are used to place the data points into the Gnuplot ASCII
   data file that will be used for plotting. It uses the parameters found in
   the GPdat structure as an indication of how the user wishes the output data
   to be formatted.

   Here is what exists in G that affects the output data:

	{ xmax, xmin }	: Initial & final values on the x-axis. These are set
                          to zero by default and hence signal that there should
                          be no axis data values output. If the values differ
                          then the axis values will be output.
        compress        : A boolean flag which indicates if data compression
                          should be attempted. If there are no axis values
                          output then this is inactive. If active and set true
                          then any place three or more adjacent data points
                          have y-values that do not significantly differ, the
                          middle points (not 1st & last in series) are skipped.
        riflag		: Flag whether real, imaginary, or complex data is
                          plotted. riflag>=0: plot reals, riflag!=0 plot imags.
			  Thus riflag=0 plots reals only, riflag<0 plots imags
                          only and riflag >0 plots both reals and imaginaries.

		// Input		ofstr	: Output ASCII file stream
		//			vx	: Vector of data points
		//			G	: Gnuplot data controls
		// Output		void	: The file ofstr will be
		//				  modified by the addition of
		//				  data points found in vx in
		//				  accordance with flags
		//				  found in G.                */
These functions are used to place the data points into the Gnuplot ASCII
data file that will be used for plotting. It uses the parameters found in
the GPdat structure as an indication of how the user wishes the output data
to be formatted.

Here is what exists in G that affects the output data.

{ xmax, xmin }  : Initial & final values on the x-axis. These are set
to zero by default and hence signal that there should
be no axis data values output. If the values differ
then the axis values will be output.
compress        : A boolean flag which indicates if data compression
should be attempted. If there are no axis values
output then this is inactive. If active and set true
then any place three or more adjacent data points
have y-values that do not significantly differ, the
middle points (not 1st & last in series) are skipped.
riflag          : Flag whether real, imaginary, or complex data is
plotted. riflag>=0: plot reals, riflag!=0 plot imags.
Thus riflag=0 plots reals only, riflag<0 plots imags
only and riflag >0 plots both reals and imaginaries.

Input                ofstr   : Output ASCII file stream
vx      : Vector of data points
G       : Gnuplot data controls
Output               void    : The file ofstr will be
modified by the addition of
data points found in vx in
accordance with flags
found in G.
These functions are used to place the data points into the Gnuplot ASCII data file that will be used for plotting . It uses the parameters found in the GPdat structure as an indication of how the user wishes the output data to be formatted . Here is what exists in G that affects the output data . { xmax xmin } : Initial & final values on the x - axis . These are set to zero by default and hence signal that there should be no axis data values output . If the values differ then the axis values will be output . compress : A boolean flag which indicates if data compression should be attempted . If there are no axis values output then this is inactive . If active and set true then any place three or more adjacent data points have y - values that do not significantly differ the middle points ( not 1st & last in series ) are skipped . riflag : Flag whether real imaginary or complex data is plotted . riflag > = 0 : plot reals riflag! = 0 plot imags . Thus riflag = 0 plots reals only riflag<0 plots imags only and riflag > 0 plots both reals and imaginaries . Input ofstr : Output ASCII file stream vx : Vector of data points G : Gnuplot data controls Output void : The file ofstr will be modified by the addition of data points found in vx in accordance with flags found in G .
std::vector<double> GP1DXAxis(const GPdat& G, int np)
  {
  std::vector<double> XVals;			
  if(G.xmin == G.xmax) return XVals;		
  XVals = std::vector<double>(np);		
  double delx = (G.xmax-G.xmin)/double(np-1);	
  for(int i=0; i<np; i++)			
    XVals[i] = G.xmin + double(i)*delx;		
  return XVals;					
  }
std :: vector < double > GP1DXAxis ( const GPdat & G , int np ) { std :: vector < double > XVals ; if ( G . xmin == G . xmax ) return XVals ; XVals = std :: vector < double > ( np ) ; double delx = ( G . xmax - G . xmin ) / double ( np - 1 ) ; for ( int i = 0 ; i < np ; i ++ ) XVals [ i ] = G . xmin + double ( i ) * delx ; return XVals ; }
These functions are used to place the data points into the Gnuplot ASCII
data file that will be used for plotting.
These functions are used to place the data points into the Gnuplot ASCII data file that will be used for plotting .
// X axis values for Y vs. X plot // Nothing if no axis specified // Set our array size // The X-axis increment //   Loop all points and set //   x-axis values // Return our X axis values