libpgplotxx.a (C++ interface to PGPLOT)
xpgplotxx.cc
Go to the documentation of this file.
1 
43 #define TF_XPGPLOTCPP_CC_VERSION \
44  "TF_XPGPLOTCPP_CC V1.6 (17-03-2015)"
45 
46 #include <string>
47 #include <iostream>
48 #include <new>
49 #include <cmath>
50 #include <pgplotxx/xpgplotxx.h>
51 
52 namespace pgplot {
53 
54  namespace helpers {
55 
57  template<class T, class T2>
58  T limit(const T& v, const T2& min, const T2& max)
59  {
60  T retval = v > min ? v : min;
61  retval = retval < max ? retval : max;
62  return(retval);
63  } // T limit(const T& v, const T2& min, const T2&, max)
64 
65  }; // namespace helpers
66 
67  /*======================================================================*/
71  {
72  if (Mflags&Fls) dev.sls(Mls);
73  if (Mflags&Flw) dev.slw(Mlw);
74  if (Mflags&Fci)
75  {
76  dev.sci(Mci);
77  if (Mflags&Frgb) dev.scr(Mci, Mcol);
78  if (Mflags&Fhls) dev.shls(Mci, Mcol);
79  }
80  }
81 
82  /*----------------------------------------------------------------------*/
83 
86  {
87  Mflags &= (~Frgb);
88  Mflags |= Fhls;
89  Mcol.r = helpers::limit(hls.h, 0., 360.);
90  Mcol.g = helpers::limit(hls.l, 0., 1.);
91  Mcol.b = helpers::limit(hls.s, 0., 1.);
92  }
93 
94  /*----------------------------------------------------------------------*/
95 
98  {
99  Mflags &= (~Fhls);
100  Mflags |= Frgb;
101  Mcol.r = helpers::limit(rgb.r, 0., 1.);
102  Mcol.g = helpers::limit(rgb.g, 0., 1.);
103  Mcol.b = helpers::limit(rgb.b, 0., 1.);
104  }
105 
106  /*----------------------------------------------------------------------*/
107 
109  bool Tlinestyle::operator!=(const Tlinestyle& ls) const
110  {
111  if (this->Mflags != ls.Mflags) return(true);
112  if ((Mflags&Flw) && (this->Mlw != ls.Mlw)) return(true);
113  if ((Mflags&Fls) && (this->Mls != ls.Mls)) return(true);
114  if ((Mflags&Fci) && (this->Mci != ls.Mci)) return(true);
115  if ((Mflags&Fci) && (Mflags&(Frgb|Fhls)) &&
116  (this->Mcol.r != ls.Mcol.r)) return(true);
117  if ((Mflags&Fci) && (Mflags&(Frgb|Fhls)) &&
118  (this->Mcol.g != ls.Mcol.g)) return(true);
119  if ((Mflags&Fci) && (Mflags&(Frgb|Fhls)) &&
120  (this->Mcol.b != ls.Mcol.b)) return(true);
121  return(false);
122  } // bool Tlinestyle::operator!=(const Tlinestyle& ls) const
123 
124  /*======================================================================*/
128  void Ttiledpanels::setup(const Trect& svp,
129  const Trect& win, const int& nx, const int& ny)
130  {
131  Mnx=(nx>0 ? nx : 1);
132  Mny=(ny>0 ? ny : 1);
133 
134  float dx=(Mvp.x.max-Mvp.x.min)/Mnx;
135  float dy=(Mvp.y.max-Mvp.y.min)/Mny;
136 
137  Mpanels=new Tpanel[Mny*Mnx];
138  for (int i=0; i<Mnx; i++)
139  {
140  for (int j=0; j<Mny; j++)
141  {
142  Tpanel& panel=Mpanels[i+j*Mnx];
143  panel.setwin(win);
144  panel.settvp(Trect(Mvp.x.min+i*dx,
145  Mvp.x.min+(i+1)*dx,
146  Mvp.y.min+j*dy,
147  Mvp.y.min+(j+1)*dy));
148  panel.setvp(svp);
149  }
150  }
151  }
152 
153  /*----------------------------------------------------------------------*/
154 
156  Mvp(panels.Mvp), Mnx(panels.Mnx), Mny(panels.Mny)
157  {
158  Mpanels=new Tpanel[Mny*Mnx];
159  for (int i=0; i<Mnx; i++)
160  {
161  for (int j=0; j<Mny; j++)
162  { Mpanels[i+j*Mnx]=panels.Mpanels[i+j*Mnx]; }
163  }
164  }
165 
166  /*----------------------------------------------------------------------*/
167 
169  {
170  Mvp=panels.Mvp;
171  Mnx=panels.Mnx;
172  Mny=panels.Mny;
173  delete[] Mpanels;
174  Mpanels=new Tpanel[Mny*Mnx];
175  for (int i=0; i<Mnx; i++)
176  {
177  for (int j=0; j<Mny; j++)
178  { Mpanels[i+j*Mnx]=panels.Mpanels[i+j*Mnx]; }
179  }
180  return(*this);
181  }
182 
183  /*----------------------------------------------------------------------*/
184 
186  { delete[] Mpanels; }
187 
188  /*----------------------------------------------------------------------*/
189 
190  Tpanel& Ttiledpanels::operator()(const int& ix, const int& iy)
191  {
192  int iix=(ix<Mnx ? ix : Mnx-1);
193  int iiix=(iix>-1 ? iix : 0);
194  int iiy=(iy<Mny ? iy : Mny-1);
195  int iiiy=(iiy>-1 ? iiy : 0);
196  return(Mpanels[iiix+iiiy*Mnx]);
197  }
198 
199  /*======================================================================*/
200  /* class Tboxstyle
201  */
202 
203  // default constructor
204  using namespace pgplot::boxflags;
205  Tboxstyle::Tboxstyle(const bool& tbox):
206  Mgridflags(Fhvselect), Mgridstyle(1, 4, 1),
207  Mframeflags(Frltbselect), Mframestyle(3, 1, 1) ,
208  Maxisflags(Fnone), Maxisstyle(1, 1, 1) ,
209  Mxtickflags(Fselect|Fticksmajor|Fticksminor),
210  Mytickflags(Fselect|Fticksmajor|Fticksminor),
211  Mxtick(0.), Mytick(0.), Mxticksub(0), Myticksub(0),
212  Mticksstyle(1, 1, 1) ,
213  Mxlabelflags(Fselect),
214  Mylabelflags(Fselect), Mlabelstyle(1, 1, 1),
215  Mtbox(tbox),
216  Mxtimeflags(Fnone),
217  Mytimeflags(Fnone)
218  { }
219 
220  /*----------------------------------------------------------------------*/
221 
223  Tboxstyle& Tboxstyle::setmode(const int& elem, const int& modes,
224  const bool& set)
225  {
226  if (elem&Fframe) {
227  if (set) { Mframeflags=(Mframeflags|modes); }
228  else { Mframeflags=(Mframeflags&(~modes)); }
229  }
230  if (elem&Faxis) {
231  if (set) { Maxisflags=(Maxisflags|modes); }
232  else { Maxisflags=(Maxisflags&(~modes)); }
233  }
234  if (elem&Fgrid) {
235  if (set) { Mgridflags=(Mgridflags|modes); }
236  else { Mgridflags=(Mgridflags&(~modes)); }
237  }
238  if (elem&Fxticks) {
239  if (set) { Mxtickflags=(Mxtickflags|modes); }
240  else { Mxtickflags=(Mxtickflags&(~modes)); }
241  }
242  if (elem&Fyticks) {
243  if (set) { Mytickflags=(Mytickflags|modes); }
244  else { Mytickflags=(Mytickflags&(~modes)); }
245  }
246  if (elem&Fxlabels) {
247  if (set) { Mxlabelflags=(Mxlabelflags|modes); }
248  else { Mxlabelflags=(Mxlabelflags&(~modes)); }
249  }
250  if (elem&Fylabels) {
251  if (set) { Mylabelflags=(Mylabelflags|modes); }
252  else { Mylabelflags=(Mylabelflags&(~modes)); }
253  }
254  if (elem&Fxtime) {
255  if (set) { Mxtimeflags=(Mxtimeflags|modes); }
256  else { Mxtimeflags=(Mxtimeflags&(~modes)); }
257  }
258  if (elem&Fytime) {
259  if (set) { Mytimeflags=(Mytimeflags|modes); }
260  else { Mytimeflags=(Mytimeflags&(~modes)); }
261  }
262  return(*this);
263  } // Tboxstyle::setmode
264 
265  /*----------------------------------------------------------------------*/
266 
268  Tboxstyle& Tboxstyle::setstyle(const int& elem, const Tlinestyle& style)
269  {
270  if (elem&Fframe) {
271  } else if (elem&Faxis) {
272  Maxisstyle=style;
273  } else if (elem&Fgrid) {
274  Mgridstyle=style;
275  } else if (elem&(Fxticks|Fyticks)) {
276  Mticksstyle=style;
277  } else if (elem&(Fxlabels|Fylabels)) {
278  Mlabelstyle=style;
279  }
280  return(*this);
281  }
282 
283  /*----------------------------------------------------------------------*/
284 
287  const Tlinestyle& linestyle,
288  const char* xopt,
289  const char* yopt) const
290  {
291  if (Mtbox)
292  {
293  linestyle(dev).tbox(xopt,Mxtick,Mxticksub,
294  yopt,Mytick,Myticksub);
295  }
296  else
297  {
298  linestyle(dev).box(xopt,Mxtick,Mxticksub,
299  yopt,Mytick,Myticksub);
300  }
301  } // void Tboxstyle::issuecommand
302 
303  /*----------------------------------------------------------------------*/
304 
307  {
308  // save plot settings
309  dev.save();
310 
311  std::string xopt, yopt;
312 
313  // prepare time options as base for all further calls
314  std::string txopt="", tyopt="";
315  if (Mtbox)
316  {
318  {
319  if (Mxtimeflags& Fxyselect)
320  {
321  txopt.append("Z");
322  if (Mxtimeflags& Ftimenoday ) txopt.append("Y");
323  if (Mxtimeflags& Ftimemod24 ) txopt.append("X");
324  if (Mxtimeflags& Ftimesuper ) txopt.append("H");
325  if (Mxtimeflags& Ftimedegrees ) txopt.append("D");
326  if (Mxtimeflags& Ftimeomitfirst ) txopt.append("F");
327  if (Mxtimeflags& Ftimeomitzeros ) txopt.append("O");
328  } // if (Mxtimeflags& Fxyselect)
329  if (Mytimeflags& Fxyselect)
330  {
331  tyopt.append("Z");
332  if (Mytimeflags& Ftimenoday ) tyopt.append("Y");
333  if (Mytimeflags& Ftimemod24 ) tyopt.append("X");
334  if (Mytimeflags& Ftimesuper ) tyopt.append("H");
335  if (Mytimeflags& Ftimedegrees ) tyopt.append("D");
336  if (Mytimeflags& Ftimeomitfirst ) tyopt.append("F");
337  if (Mytimeflags& Ftimeomitzeros ) tyopt.append("O");
338  } // if (Mytimeflags& Fxyselect)
339  } // if ((Mxtimeflags&Fxyselect)|(Mytimeflags&Fxyselect))
340  } // if (Mtbox)
341 
342  // frame
343  if (Mframeflags)
344  {
345  xopt=txopt; yopt=tyopt;
346  if (Mframeflags& Flselect ) yopt.append("B");
347  if (Mframeflags& Frselect ) yopt.append("C");
348  if (Mframeflags& Fbselect ) xopt.append("B");
349  if (Mframeflags& Ftselect ) xopt.append("C");
350 
351  this->issuecommand(dev, Mframestyle, xopt.c_str(), yopt.c_str());
352 
353  // ticks
354  // PGPLOT will draw ticks only when frame is drawn
355  // accumulate xopt and yopt
357  {
358  if (Mxtickflags& Fxyselect)
359  {
360  if (Mxtickflags& Fticksinvert ) xopt.append("I");
361  if (Mxtickflags& Fticksextend ) xopt.append("P");
362  if (Mxtickflags& Fticksmajor ) xopt.append("T");
363  if (Mxtickflags& Fticksminor ) xopt.append("S");
364  }
365  if (Mytickflags& Fxyselect )
366  {
367  if (Mytickflags& Fticksinvert ) yopt.append("I");
368  if (Mytickflags& Fticksextend ) yopt.append("P");
369  if (Mytickflags& Fticksmajor ) yopt.append("T");
370  if (Mytickflags& Fticksminor ) yopt.append("S");
371  }
372 
373  // redraws frame in ticksstyle but now also plots tick marks
374  this->issuecommand(dev, Mticksstyle, xopt.c_str(), yopt.c_str());
375  }
376  }
377 
378  // axis
379  if (Maxisflags)
380  {
381  xopt=txopt; yopt=tyopt;
382  if (Maxisflags& Fxselect ) xopt.append("A");
383  if (Maxisflags& Fyselect ) yopt.append("A");
384  this->issuecommand(dev, Maxisstyle, xopt.c_str(), yopt.c_str());
385  }
386 
387  // grid
388  if (Mgridflags)
389  {
390  xopt=txopt; yopt=tyopt;
391  if (Mgridflags& Fvselect ) xopt.append("G");
392  if (Mgridflags& Fhselect ) yopt.append("G");
393  this->issuecommand(dev, Mgridstyle, xopt.c_str(), yopt.c_str());
394  }
395 
396  // labels
398  {
399  xopt=txopt; yopt=tyopt;
400  if (Mxlabelflags& Fxyselect)
401  {
402  if (Mxlabelflags& Flabelopp ) {
403  xopt.append("M");
404  } else {
405  xopt.append("N");
406  }
407  if (Mxlabelflags& Flabelvert ) xopt.append("V");
408  if (Mxlabelflags& Flabeldec ) {
409  xopt.append("1");
410  } else if (Mxlabelflags& Flabelexp ) {
411  xopt.append("2");
412  }
413  if (Mxlabelflags& Flabellog ) xopt.append("L");
414  }
415  if (Mylabelflags& Fxyselect)
416  {
417  if (Mylabelflags& Flabelopp ) {
418  yopt.append("M");
419  } else {
420  yopt.append("N");
421  }
422  if (Mylabelflags& Flabelvert ) yopt.append("V");
423  if (Mylabelflags& Flabeldec ) {
424  yopt.append("1");
425  } else if (Mylabelflags& Flabelexp ) {
426  yopt.append("2");
427  }
428  if (Mylabelflags& Flabellog ) yopt.append("L");
429  }
430  this->issuecommand(dev, Mlabelstyle, xopt.c_str(), yopt.c_str());
431  }
432 
433  // restore plot settings
434  dev.unsa();
435  } // Tboxstyle::apply
436 
437  /*======================================================================*/
438  /* class Ttext
439  */
440  Ttext& Ttext::print(basic_device& dev, const char* txt,
441  const bool& nl, const float& sep)
442  {
443  float xbox[4], ybox[4];
444  // get bounding box
445  dev.qtxt(Mxref, Myref, Mangle, Mjust, txt, xbox, ybox);
446  // erase txet if requested
447  if (Merase)
448  {
449  dev.save();
450  dev.sfs(1);
451  dev.sci(0);
452  dev.poly(4, xbox, ybox);
453  dev.unsa();
454  }
455  // store bounding box
456  Mbbox=Tbbox(xbox, ybox);
457  // print text
458  dev.ptxt(Mxref, Myref, Mangle, Mjust, txt);
459 
460  this->advance(xbox, ybox, nl, sep);
461  return(*this);
462  } // Ttext::print
463 
464  /*----------------------------------------------------------------------*/
465 
466  void Ttext::advance(const float* xbox,
467  const float* ybox,
468  const bool& nl,
469  const float& sep)
470  {
471  // infer new refernce position from bounding box
472  float dxh=xbox[3]-xbox[0];
473  float dyh=ybox[3]-ybox[0];
474  float ddh=sqrt(dxh*dxh+dyh*dyh);
475  float dxv=xbox[1]-xbox[0];
476  float dyv=ybox[1]-ybox[0];
477  float ddv=sqrt(dxv*dxv+dyv*dyv);
478  dxv+=sep*dxv/ddv;
479  dyv+=sep*dyv/ddv;
480  dxh+=sep*dxh/ddh;
481  dyh+=sep*dyh/ddh;
482  if (nl)
483  {
484  // start at new line position
485  if (Minline)
486  {
487  // we were already within the line -> take prepare reference
488  Mxref=Mxnl;
489  Myref=Mynl;
490  }
491  else
492  {
493  // we did start from the reference position -> shift both
494  Mxref=Mxref-dxv;
495  Myref=Myref-dyv;
496  }
497  Mxnl=Mxref-dxv;
498  Mynl=Myref-dyv;
499  Minline=false;
500  }
501  else
502  {
503  // stay in line
504  if (!Minline)
505  {
506  // we did start from newline position -> remember new newline
507  Mxnl=Mxref-dxv;
508  Mynl=Myref-dyv;
509  }
510  // find new reference position
511  // this will only work with Mjust=0. and Mjust=1.
512  Mxref=Mxref+(1.-2.*Mjust)*dxh;
513  Myref=Myref+(1.-2.*Mjust)*dyh;
514  Minline=true;
515  }
516  } // Ttext::advance
517 
518  /*----------------------------------------------------------------------*/
519 
521  {
522  const char* spacechar="t";
523  float xbox[4], ybox[4];
524  // get bounding box
525  dev.qtxt(Mxref, Myref, Mangle, Mjust, spacechar, xbox, ybox);
526  // erase txet if requested
527  if (Merase)
528  {
529  dev.save();
530  dev.sfs(1);
531  dev.sci(0);
532  dev.poly(4, xbox, ybox);
533  dev.unsa();
534  }
535  this->advance(xbox, ybox, false, 0.);
536  return(*this);
537  } // Ttext::space
538 
539  /*======================================================================*/
540  /*
541  * constants
542  * =========
543  */
545  Trange c_range01(0.,1.);
547  Trange c_range19(0.1,0.9);
552 
553 } // namespace pgplot
554 
555 /* ----- END OF xpgplotxx.cc ----- */
yselect, vselect, rselect (y, vertical, right)
Definition: xpgplotxx.h:343
bool Mtbox
is a TBOX
Definition: xpgplotxx.h:540
int Mytimeflags
is a TBOX
Definition: xpgplotxx.h:542
Tlinestyle Maxisstyle
axis linestyle
Definition: xpgplotxx.h:514
Tlinestyle Mframestyle
frame linestyle
Definition: xpgplotxx.h:506
int Mlw
line width
Definition: xpgplotxx.h:127
Tlinestyle & sethls(const Tcol &hls)
set color representation with hls values
Definition: xpgplotxx.cc:85
Trange c_range19(0.1, 0.9)
range form 0.1 to 0.9
Definition: xpgplotxx.h:618
panel area
Definition: xpgplotxx.h:149
box style
Definition: xpgplotxx.h:451
int Mxtickflags
tick options
Definition: xpgplotxx.h:520
Ttiledpanels(const Tpanel &panel, const Trect &svp, const Trect &win, const int &nx, const int &ny)
Definition: xpgplotxx.h:248
opposite (labels)
Definition: xpgplotxx.h:369
contains all pgplot stuff
Definition: affpgplot.cc:46
hold bounding box for text etc.
Definition: structs.h:204
int Mgridflags
has grid
Definition: xpgplotxx.h:496
text plotting tool.
Definition: xpgplotxx.h:557
basic_device & sci(const int &ci)
set color index
Definition: basicdevice.h:406
setting selection flags
Definition: xpgplotxx.h:343
basic_device & save(void)
save device settings
Definition: basicdevice.h:394
Tbbox Mbbox
place to store bounding box of print function
Definition: xpgplotxx.h:605
int Mxlabelflags
label options
Definition: xpgplotxx.h:532
int Mls
line style
Definition: xpgplotxx.h:123
void setup(const Trect &svp, const Trect &win, const int &nx, const int &ny)
function used by constructors
Definition: xpgplotxx.cc:128
Tpanel & setwin(const Trect &win)
set world coordinates
Definition: xpgplotxx.h:185
hold any parameter range
Definition: structs.h:42
multipanel area
Definition: xpgplotxx.h:238
major (tick marks)
Definition: xpgplotxx.h:361
int Mnx
number of subpanels
Definition: xpgplotxx.h:293
basic_device & qtxt(const float &x, const float &y, const float &angle, const float &fjust, const char *text, float *xbox, float *ybox)
get bounding box of text
Definition: basicdevice.h:322
logarithmic scale (labels)
Definition: xpgplotxx.h:377
basic_device & scr(const int &ci, const float &cr, const float &cg, const float &cb)
set color representation
Definition: basicdevice.h:415
Tlinestyle Mgridstyle
grid linestyle
Definition: xpgplotxx.h:498
basic_device & slw(const int &lw)
set line width
Definition: basicdevice.h:448
Tlinestyle Mticksstyle
ticks linestyle
Definition: xpgplotxx.h:526
Trange x
coordinate ranges
Definition: structs.h:132
void advance(const float *xbox, const float *ybox, const bool &nl, const float &sep)
advance to new reference position
Definition: xpgplotxx.cc:466
setting selection flags
Definition: xpgplotxx.h:341
int Mci
color index
Definition: xpgplotxx.h:125
int Mflags
flags
Definition: xpgplotxx.h:129
Frltbselect (right, left, top, and bottom)
Definition: xpgplotxx.h:349
basic_device & sls(const int &ls)
set line style
Definition: basicdevice.h:445
basic_device & poly(int n, const float *xpts, const float *ypts)
draw polygonial line
Definition: basicdevice.h:253
basic_device & sfs(const int &fs)
set fill style
Definition: basicdevice.h:428
~Ttiledpanels()
destructor
Definition: xpgplotxx.cc:185
Tboxstyle & setmode(const int &elem, const int &modes, const bool &set=true)
general mode setting
Definition: xpgplotxx.cc:223
bool Minline
true if text was written previously with no nl
Definition: xpgplotxx.h:604
extend (tick marks)
Definition: xpgplotxx.h:359
force exponential (labels)
Definition: xpgplotxx.h:375
Tpanel * Mpanels
array of subpanels
Definition: xpgplotxx.h:295
Tpanel & setvp(const Trect &vp)
set viewport relative to total viewport
Definition: xpgplotxx.h:179
Trange y
Definition: structs.h:132
Trange c_range01(0., 1.)
range form 0 to 1
Definition: xpgplotxx.h:616
int Mylabelflags
label options
Definition: xpgplotxx.h:532
Tboxstyle(const bool &tbox=false)
Definition: xpgplotxx.cc:205
Tpanel & operator()(const int &ix, const int &iy)
return subpanel
Definition: xpgplotxx.cc:190
float Mangle
Definition: xpgplotxx.h:602
omit first label (time scale)
Definition: xpgplotxx.h:391
degrees, minutes, and seconds (time scale)
Definition: xpgplotxx.h:389
pgplot base class
Definition: basicdevice.h:57
bselect (bottom)
Definition: xpgplotxx.h:347
setting selection flags
Definition: xpgplotxx.h:343
int Myticksub
tick options
Definition: xpgplotxx.h:524
int Mxticksub
tick subintervals
Definition: xpgplotxx.h:524
void issuecommand(basic_device &dev, const Tlinestyle &linestyle, const char *xopt, const char *yopt) const
issue appropriate box command
Definition: xpgplotxx.cc:286
do not include day field (time scale)
Definition: xpgplotxx.h:383
int Mytickflags
tick options
Definition: xpgplotxx.h:520
float Mynl
text reference position for carriage return
Definition: xpgplotxx.h:603
int Mxtimeflags
time scale options
Definition: xpgplotxx.h:542
basic_device & ptxt(const float &x, const float &y, const float &angle, const float &fjust, const char *text)
write text at arbitraty position
Definition: basicdevice.h:262
line style attributes
Definition: xpgplotxx.h:68
C++ extensions to PGPLOT.
float Mytick
tick options
Definition: xpgplotxx.h:522
force decimal (labels)
Definition: xpgplotxx.h:373
float min
range [min....max]
Definition: structs.h:44
Trect c_rect1919(c_range19, c_range19)
rect form 0.1,0.1 to 0.9,0.9
Definition: xpgplotxx.h:622
setting selection flags
Definition: xpgplotxx.h:341
Tcol Mcol
rgb or hls colour setting
Definition: xpgplotxx.h:131
float l
Definition: structs.h:224
void apply(basic_device &dev) const
apply to basic device class
Definition: xpgplotxx.cc:70
basic_device & shls(const int &ci, const float &ch, const float &cl, const float &cs)
set color in the HLS system
Definition: basicdevice.h:431
float s
Definition: structs.h:226
hour modulus 24h (time scale)
Definition: xpgplotxx.h:385
setting selection flags
Definition: xpgplotxx.h:351
Fxyselect, Fhvselect (x and y, left and right)
Definition: xpgplotxx.h:351
hold any rectangle
Definition: structs.h:130
a struct to hold colour triples i.e. rgb or hls values
Definition: structs.h:220
Ttiledpanels & operator=(const Ttiledpanels &panels)
Definition: xpgplotxx.cc:168
Ttext & space(basic_device &dev)
advance one character
Definition: xpgplotxx.cc:520
int Mframeflags
has frame
Definition: xpgplotxx.h:504
float r
Definition: structs.h:222
float Mxtick
major tick interval
Definition: xpgplotxx.h:522
vertical (labels)
Definition: xpgplotxx.h:371
float g
Definition: structs.h:224
float Mjust
parameters to pgptxt
Definition: xpgplotxx.h:602
float b
Definition: structs.h:226
namespace containing flags for Tboxstyle
Definition: xpgplotxx.h:301
Tlinestyle & setrgb(const Tcol &rgb)
set color representation with rgb values
Definition: xpgplotxx.cc:97
float max
Definition: structs.h:44
T limit(const T &v, const T2 &min, const T2 &max)
limit a value to min and max
Definition: xpgplotxx.cc:58
minor (tick marks)
Definition: xpgplotxx.h:363
Ttext & print(basic_device &dev, const char *txt, const bool &nl=false, const float &sep=0.025)
print text.
Definition: xpgplotxx.cc:440
void apply(basic_device &dev) const
apply to basic device class
Definition: xpgplotxx.cc:306
Trect c_rect0101(c_range01, c_range01)
rect form 0,0 to 1,1
Definition: xpgplotxx.h:620
setting selection flags
Definition: xpgplotxx.h:341
omit leading zeros (time scale)
Definition: xpgplotxx.h:393
use superscript symbols (time scale)
Definition: xpgplotxx.h:387
float h
Definition: structs.h:222
Trect Mvp
the total view surface area
Definition: xpgplotxx.h:291
setting selection flags
Definition: xpgplotxx.h:341
Tlinestyle Mlabelstyle
labels linestyle
Definition: xpgplotxx.h:534
float Myref
text reference position
Definition: xpgplotxx.h:601
bool operator!=(const Tlinestyle &ls) const
compare
Definition: xpgplotxx.cc:109
bool Merase
erase box prior to plotting text
Definition: xpgplotxx.h:606
Tboxstyle & setstyle(const int &elem, const Tlinestyle &style)
set linestyle
Definition: xpgplotxx.cc:268
int Maxisflags
has axis
Definition: xpgplotxx.h:512
Tpanel & settvp(const Trect &tvp)
set total viewport relative to device surface
Definition: xpgplotxx.h:182
basic_device & unsa(void)
restore device settings
Definition: basicdevice.h:397