libpgplotxx.a (C++ interface to PGPLOT)

◆ series_line()

template<class T , class SX , class SY >
T& pgplot::series_line ( T &  dev,
const SX &  x,
const SY &  y 
)

draw an open polygon from a dense series

This implements cpgline functionality.

The following is required for class SX and SY:

  1. BrowserT the type of an appropriate browser

The browser must provide

  1. hot() true if pointing to valid element
Parameters
devdevice to be plotted on
xseries of x-coordinates
ycorresponding series of y-coordinates
SXseries class for x
SYseries class for y
Tpgplot device class
Returns
returns a reference to the device context

Definition at line 679 of file xpgplotxx.h.

680  {
681  typename SX::BrowserT ix=x;
682  typename SY::BrowserT iy=y;
683  float fx=float(*ix);
684  float fy=float(*iy);
685  dev.move(fx, fy);
686  while ((ix.hot()) && (iy.hot()))
687  { fx=float(*ix); fy=float(*iy); dev.draw(fx, fy); ++ix; ++iy; }
688  return(dev);
689  }