libpgplotxx.a (C++ interface to PGPLOT)

◆ errb()

template<class T , class SX , class SY , class SE >
T& pgplot::pgaff::errb ( T &  dev,
const SX &  x,
const SY &  y,
const SE &  e,
const Eerrdir dir = Fdirver,
const float &  t = 1. 
)

draw error bars from series

This implements cpgerrb functionality.

Parameters
devdevice to be plotted on
xseries of x-coordinates
ycorresponding series of y-coordinates
ecorresponding series of error bars
tlength of terminals to be drawn
SXseries class for x
SYseries class for y
SEseries class for e
Tpgplot device class
Returns
returns a reference to the device context

Definition at line 164 of file affpgplot.h.

166  {
167  typename aff::Browser<SX> ix=x;
168  typename aff::Browser<SY> iy=y;
169  typename aff::Browser<SE> ie=e;
170  float fx=float(*ix);
171  float fy=float(*iy);
172  float fe=float(*ie);
173  int idir=int(dir);
174  while ((ix.valid()) && (iy.valid()) && (ie.valid()))
175  { fx=float(*ix); fy=float(*iy); fe=float(*ie);
176  dev.err1(idir, fx, fy, fe, t); ++ix; ++iy; ++ie; }
177  return(dev);
178  }