45 #ifndef TF_XPGPLOTCPP_H_VERSION 47 #define TF_XPGPLOTCPP_H_VERSION \ 48 "TF_XPGPLOTCPP_H V1.7 (17-03-2015)" 117 {
apply(dev);
return(dev); }
183 {
Mtvp=tvp;
return(*
this); }
186 {
Mwin=win;
return(*
this); }
213 return(this->
operator()(dev));
249 const int& nx,
const int& ny):
251 { this->
setup(svp, win, nx, ny); }
261 const int& nx,
const int& ny):
263 { this->
setup(svp, win, nx, ny); }
289 const int& nx,
const int& ny);
469 const bool&
set=
true);
483 {
apply(dev);
return(dev); }
491 const char* yopt)
const;
571 Ttext(
const float& x,
const float& y,
const float& angle=0.,
572 const float& just=0.):
583 const bool& nl=
false,
const float& sep=0.025);
597 void advance(
const float* xbox,
644 typename S::BrowserT iter=series;
646 Trange result(value,value);
650 result.
min=(result.
min > value ? value : result.
min);
651 result.
max=(result.
max < value ? value : result.
max);
678 template<
class T,
class SX,
class SY>
681 typename SX::BrowserT ix=x;
682 typename SY::BrowserT iy=y;
686 while ((ix.hot()) && (iy.hot()))
687 { fx=float(*ix); fy=float(*iy); dev.draw(fx, fy); ++ix; ++iy; }
733 template<
class T,
class SX,
class SY,
class SE>
737 typename SX::BrowserT ix=x;
738 typename SY::BrowserT iy=y;
739 typename SE::BrowserT ie=e;
744 while ((ix.hot()) && (iy.hot()) && (ie.hot()))
745 { fx=float(*ix); fy=float(*iy); fe=float(*ie);
746 dev.err1(idir, fx, fy, fe, t); ++ix; ++iy; ++ie; }
754 #endif // TF_XPGPLOTCPP_H_VERSION (includeguard)
Trect getvp() const
return viewport
yselect, vselect, rselect (y, vertical, right)
Tlinestyle Maxisstyle
axis linestyle
Tlinestyle Mframestyle
frame linestyle
Trect Mwin
world coordinates
Tlinestyle & sethls(const Tcol &hls)
set color representation with hls values
Trange c_range19(0.1, 0.9)
range form 0.1 to 0.9
int Mxtickflags
tick options
int nysub() const
return number of x-subpanels
Ttiledpanels(const Tpanel &panel, const Trect &svp, const Trect &win, const int &nx, const int &ny)
T & erase(T &dev) const
erase panel area
int nxsub() const
return number of x-subpanels
contains all pgplot stuff
hold bounding box for text etc.
Tpanel(const Trect &win, const Trect &tvp=Trect(0., 1., 0., 1.), const Trect &vp=Trect(0.1, 0.9, 0.1, 0.9))
Eflags
flags indicating the setting used
Tbbox Mbbox
place to store bounding box of print function
int Mxlabelflags
label options
Tboxstyle & setytickint(const int &minor=0, const float &major=0.)
set y-ticks interval
Trect Mtvp
total viewport including labels
void setup(const Trect &svp, const Trect &win, const int &nx, const int &ny)
function used by constructors
T & series_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
Tpanel & setwin(const Trect &win)
set world coordinates
T & operator()(T &dev) const
use in device context
T & series_line(T &dev, const SX &x, const SY &y)
draw an open polygon from a dense series
int Mnx
number of subpanels
C++ interface for PGPLOT.
Tpanel()
default constructor
logarithmic scale (labels)
Tlinestyle & cls()
discard line style setting
Tlinestyle Mgridstyle
grid linestyle
Tpanel(const Tpanel &ref, const Trect &win, const Trect &tvp=Trect(0., 1., 0., 1.), const Trect &vp=Trect(0.1, 0.9, 0.1, 0.9))
Tlinestyle(const int &lw, const int &ls, const int &ci)
linewidth and linestyle and color index constructor
Tlinestyle Mticksstyle
ticks linestyle
void advance(const float *xbox, const float *ybox, const bool &nl, const float &sep)
advance to new reference position
Tlinestyle & setlw(const int &lw)
set linewidth
Tlinestyle & ccr()
discard colour representation setting
bool operator==(const Tlinestyle &a, const Tlinestyle &b)
compare for euqality
Frltbselect (right, left, top, and bottom)
Ttiledpanels(const Trect &vp, const Trect &svp, const Trect &win, const int &nx, const int &ny)
Tlinestyle & setci(const int &ci)
set color index
~Ttiledpanels()
destructor
Tboxstyle & setmode(const int &elem, const int &modes, const bool &set=true)
general mode setting
Trange find_series_range(const S &series)
find range in series
bool Minline
true if text was written previously with no nl
Trect gettvp() const
return total viewport
Tbbox bbox() const
return bounding box of previously printed text.
force exponential (labels)
Tpanel * Mpanels
array of subpanels
Tpanel & setvp(const Trect &vp)
set viewport relative to total viewport
Trange c_range01(0., 1.)
range form 0 to 1
int Mylabelflags
label options
Tboxstyle(const bool &tbox=false)
Tpanel & operator()(const int &ix, const int &iy)
return subpanel
omit first label (time scale)
degrees, minutes, and seconds (time scale)
T & operator()(T &dev) const
apply boxstyle to device context
Tlinestyle()
default constructor
Tlinestyle(const int &lw)
linewidth constructor
Ttext(const float &x, const float &y, const float &angle=0., const float &just=0.)
setup initial text position and orientation.
Trect getwin() const
return world coordinate range
int Myticksub
tick options
int Mxticksub
tick subintervals
void issuecommand(basic_device &dev, const Tlinestyle &linestyle, const char *xopt, const char *yopt) const
issue appropriate box command
do not include day field (time scale)
int Mytickflags
tick options
float Mynl
text reference position for carriage return
int Mxtimeflags
time scale options
Tlinestyle(const int &lw, const int &ls)
linewidth and linestyle constructor
float min
range [min....max]
Tlinestyle & clw()
discard line width setting
Trect c_rect1919(c_range19, c_range19)
rect form 0.1,0.1 to 0.9,0.9
Tcol Mcol
rgb or hls colour setting
void apply(basic_device &dev) const
apply to basic device class
hour modulus 24h (time scale)
Fxyselect, Fhvselect (x and y, left and right)
void noerase()
do not erase text box prior to plotting text
a struct to hold colour triples i.e. rgb or hls values
Ttiledpanels & operator=(const Ttiledpanels &panels)
Ttext()
default constructor.
Ttext & space(basic_device &dev)
advance one character
float Mxtick
major tick interval
Tlinestyle & setls(const int &ls)
set linestyle
float Mjust
parameters to pgptxt
Tlinestyle & cci()
discard colour index setting
Tlinestyle & setrgb(const Tcol &rgb)
set color representation with rgb values
Ttext & print(basic_device &dev, const char *txt, const bool &nl=false, const float &sep=0.025)
print text.
void apply(basic_device &dev) const
apply to basic device class
Trect c_rect0101(c_range01, c_range01)
rect form 0,0 to 1,1
Trect & shrinkf(const Trect &rect)
fractional shrink/expand
void erase()
erase text box prior to plotting text
Eerrdir
error bar directions
omit leading zeros (time scale)
Tboxstyle & setxtickint(const int &minor=0, const float &major=0.)
set x-ticks interval
use superscript symbols (time scale)
Trect Mvp
the total view surface area
Tlinestyle Mlabelstyle
labels linestyle
float Myref
text reference position
Trect Mvp
view port for graph
bool operator!=(const Tlinestyle &ls) const
compare
bool Merase
erase box prior to plotting text
Tboxstyle & setstyle(const int &elem, const Tlinestyle &style)
set linestyle
T & operator()(T &dev) const
apply linestyle to device context
Tpanel & settvp(const Trect &tvp)
set total viewport relative to device surface