Just a simple example to show how the pgplot classes may be used.
56 cout <<
"pgplotxxdemo" << endl;
57 cout <<
"(example program for the C++ interface for PGPLOT)" << endl;
74 for (
int i=A.first(0); i<=A.last(0); ++i)
76 for (
int j=A.first(1); j<=A.last(1); ++j)
115 for (
int i=0; i<imax; ++i)
117 x(i)=std::sin(2.*3.14159265*i/imax);
118 y(i)=std::cos(2.*3.14159265*i/imax);
120 d2.subp(1,1).env(-1.,1.,-1.,1.,1,2);
123 for (
int i=0; i<imax; ++i)
126 d2.pt1(0.8*x(i),0.8*y(i),-i);
Trange & swap()
swap range
Trange array_value_range(const Tarray::Tcoc &a)
return range of values
pgplot::basic_device & gray(pgplot::basic_device &dev, const Tarray &a, const pgplot::Trange &range, const Ttransform &tr)
function to plot gray image
basic_device & gwedg(const Trange &range, const char *label="value", const float &disp=0.3, const float &width=3.0, const char *side="RG")
annotate an image plot with a wedge
aff::Series< float > Tseries
aff::Array< float > Tarray
array type to be passed to gray function
basic_device & env(const float &xmin, const float &xmax, const float &ymin, const float &ymax, const int &just=0, const int &axis=0)
define PGPLOT window and axis
the standard device class
T & line(T &dev, const SX &x, const SY &y)
draw an open polygon from a dense series
T & pt(T &dev, const SX &x, const SY &y, const int &s)
draw symbols from series