casacore
PGPlotterNull.h
Go to the documentation of this file.
1 //# PGPlotterNull.h: Plot to a PGPLOT device "null" to this process.
2 //# Copyright (C) 1997,2001
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //#
27 //# $Id$
28 
29 #ifndef GRAPHICS_PGPLOTTERNULL_H
30 #define GRAPHICS_PGPLOTTERNULL_H
31 
32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/System/PGPlotter.h>
34 
35 namespace casacore { //# NAMESPACE CASACORE - BEGIN
36 
37 class String;
38 template<class T> class Vector;
39 
40 // <summary>
41 // Plot to a PGPLOT device "local" to this process.
42 // </summary>
43 
44 // <use visibility=export>
45 
46 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
47 // </reviewed>
48 
49 // <prerequisite>
50 // <li> <linkto class="PGPlotterInterface">PGPlotterInterface</linkto>
51 // </prerequisite>
52 //
53 // <etymology>
54 // "Null" is used to denote that no plotting is done
55 // </etymology>
56 //
57 // <synopsis>
58 // Generally programmers should not use this class, instead they should use
59 // <linkto class="PGPlotter">PGPlotter</linkto> instead.
60 //
61 // This class make a concrete
62 // <linkto class="PGPlotterInterface">PGPlotterInterface</linkto> object which
63 // calls PGPLOT directly, i.e. PGPLOT is linked into the current executable.
64 // </synopsis>
65 //
66 // <example>
67 // <srcblock>
68 // // plot y = x*x
69 // Vector<Float> x(100), y(100);
70 // indgen(x);
71 // y = x*x;
72 
73 // PGPlotterNull plotter("myplot.ps/ps");
74 // plotter.env(0, 100, 0, 100*100, 0, 0);
75 // plotter.line(x, y);
76 // </srcblock>
77 // </example>
78 //
79 // <motivation>
80 // It might be necessary to call PGPLOT directly in some circumstances. For
81 // example, it might be too inefficient to pass a lot of Image data over the
82 // glish bus.
83 // </motivation>
84 //
85 // <todo asof="1997/12/31">
86 // <li> Add more plot calls.
87 // </todo>
88 
90 {
91 public:
92  // Open "device", which must be a valid PGPLOT style device, for example
93  // <src>/cps</src> for colour postscript (or <src>myfile.ps/cps</src>
94  // if you want to name the file), or <src>/xs</src> or <src>/xw</src> for
95  // and X-windows display.
96  // <thrown>
97  // <li> An <linkto class="AipsError">AipsError</linkto> will be thrown
98  // if the underlying PGPLOT open fails for some reason.
99  // </thrown>
100  PGPlotterNull(const String &device);
101  // The destructor closes the pgplot device.
102  virtual ~PGPlotterNull();
103 
104  // The create function to create a PGPlotter object using a PGPlotterNull.
105  // It only uses the device argument.
106  static PGPlotter createPlotter (const String &device,
107  uInt, uInt, uInt, uInt);
108 
109  // This is an emulated standard PGPLOT command. It returns a record
110  // containing the fields:
111  // <srcblock>
112  // [ok=Bool, x=Float, y=Float, ch=String];
113  // If the remote device cannot do cursor feedback, ok==F.
114  // </srcblock>
115  virtual Record curs(Float x, Float y);
116 
117 
118  // Standard PGPLOT commands. Documentation for the individual commands
119  // can be found in the Glish manual and in the standard PGPLOT documentation
120  // which may be found at <src>http://astro.caltech.edu/~tjp/pgplot/</src>.
121  // The Glish/PGPLOT documentation is preferred since this interface follows
122  // it exactly (e.g. the array sizes are inferred both here and in Glish,
123  // whereas they must be passed into standard PGPLOT).
124  // <group>
125  virtual void arro(Float x1, Float y1, Float x2, Float y2);
126  virtual void ask(Bool flag);
127  virtual void bbuf();
128  virtual void bin(const Vector<Float> &x, const Vector<Float> &data,
129  Bool center);
130  virtual void box(const String &xopt, Float xtick, Int nxsub,
131  const String &yopt, Float ytick, Int nysub);
132  virtual void circ(Float xcent, Float ycent, Float radius);
133  virtual void conb(const Matrix<Float> &a, const Vector<Float> &c,
134  const Vector<Float> &tr, Float blank);
135  virtual void conl(const Matrix<Float> &a, Float c,
136  const Vector<Float> &tr, const String &label,
137  Int intval, Int minint);
138  virtual void cons(const Matrix<Float> &a, const Vector<Float> &c,
139  const Vector<Float> &tr);
140  virtual void cont(const Matrix<Float> &a, const Vector<Float> &c,
141  Bool nc, const Vector<Float> &tr);
142  virtual void ctab(const Vector<Float> &l, const Vector<Float> &r,
143  const Vector<Float> &g, const Vector<Float> &b,
144  Float contra, Float bright);
145  virtual void draw(Float x, Float y);
146  virtual void ebuf();
147  virtual void env(Float xmin, Float xmax, Float ymin, Float ymax, Int just,
148  Int axis);
149  virtual void eras();
150  virtual void errb(Int dir, const Vector<Float> &x, const Vector<Float> &y,
151  const Vector<Float> &e, Float t);
152  virtual void errx(const Vector<Float> &x1, const Vector<Float> &x2,
153  const Vector<Float> &y, Float t);
154  virtual void erry(const Vector<Float> &x, const Vector<Float> &y1,
155  const Vector<Float> &y2, Float t);
156  virtual void gray(const Matrix<Float> &a, Float fg, Float bg,
157  const Vector<Float> &tr);
158  virtual void hi2d(const Matrix<Float> &data, const Vector<Float> &x,
159  Int ioff, Float bias, Bool center,
160  const Vector<Float> &ylims);
161  virtual void hist(const Vector<Float> &data, Float datmin, Float datmax,
162  Int nbin, Int pcflag);
163  virtual void iden();
164  virtual void imag(const Matrix<Float> &a, Float a1, Float a2,
165  const Vector<Float> &tr);
166  virtual void lab(const String &xlbl, const String &ylbl,
167  const String &toplbl);
168  virtual void ldev();
169  virtual Vector<Float> len(Int units, const String &string);
170  virtual void line(const Vector<Float> &xpts, const Vector<Float> &ypts);
171  virtual void move(Float x, Float y);
172  virtual void mtxt(const String &side, Float disp, Float coord, Float fjust,
173  const String &text);
174  virtual String numb(Int mm, Int pp, Int form);
175  virtual void page();
176  virtual void panl(Int ix, Int iy);
177  virtual void pap(Float width, Float aspect);
178  virtual void pixl(const Matrix<Int> &ia, Float x1, Float x2,
179  Float y1, Float y2);
180  virtual void pnts(const Vector<Float> &x, const Vector<Float> &y,
181  const Vector<Int> symbol);
182  virtual void poly(const Vector<Float> &xpts, const Vector<Float> &ypts);
183  virtual void pt(const Vector<Float> &xpts, const Vector<Float> &ypts,
184  Int symbol);
185  virtual void ptxt(Float x, Float y, Float angle, Float fjust,
186  const String &text);
187  virtual Vector<Float> qah();
188  virtual Int qcf();
189  virtual Float qch();
190  virtual Int qci();
191  virtual Vector<Int> qcir();
192  virtual Vector<Int> qcol();
193  virtual Vector<Float> qcr(Int ci);
194  virtual Vector<Float> qcs(Int units);
195  virtual Int qfs();
196  virtual Vector<Float> qhs();
197  virtual Int qid();
198  virtual String qinf(const String &item);
199  virtual Int qitf();
200  virtual Int qls();
201  virtual Int qlw();
202  virtual Vector<Float> qpos();
203  virtual Int qtbg();
204  virtual Vector<Float> qtxt(Float x, Float y, Float angle, Float fjust,
205  const String &text);
206  virtual Vector<Float> qvp(Int units);
207  virtual Vector<Float> qvsz(Int units);
208  virtual Vector<Float> qwin();
209  virtual void rect(Float x1, Float x2, Float y1, Float y2);
210  virtual Float rnd(Float x, Int nsub);
211  virtual Vector<Float> rnge(Float x1, Float x2);
212  virtual void sah(Int fs, Float angle, Float vent);
213  virtual void save();
214  virtual void scf(Int font);
215  virtual void sch(Float size);
216  virtual void sci(Int ci);
217  virtual void scir(Int icilo, Int icihi);
218  virtual void scr(Int ci, Float cr, Float cg, Float cb);
219  virtual void scrn(Int ci, const String &name);
220  virtual void sfs(Int fs);
221  virtual void shls(Int ci, Float ch, Float cl, Float cs);
222  virtual void shs(Float angle, Float sepn, Float phase);
223  virtual void sitf(Int itf);
224  virtual void sls(Int ls);
225  virtual void slw(Int lw);
226  virtual void stbg(Int tbci);
227  virtual void subp(Int nxsub, Int nysub);
228  virtual void svp(Float xleft, Float xright, Float ybot, Float ytop);
229  virtual void swin(Float x1, Float x2, Float y1, Float y2);
230  virtual void tbox(const String &xopt, Float xtick, Int nxsub,
231  const String &yopt, Float ytick, Int nysub);
232  virtual void text(Float x, Float y, const String &text);
233  virtual void unsa();
234  virtual void updt();
235  virtual void vect(const Matrix<Float> &a, const Matrix<Float> &b,
236  Float c, Int nc,
237  const Vector<Float> &tr, Float blank);
238  virtual void vsiz(Float xleft, Float xright, Float ybot,
239  Float ytop);
240  virtual void vstd();
241  virtual void wedg(const String &side, Float disp, Float width,
242  Float fg, Float bg, const String &label);
243  virtual void wnad(Float x1, Float x2, Float y1, Float y2);
244  // </group>
245 
246  private:
247  // Undefined and inaccessible
250 
251  // PGPLOT id
252  int id_p;
254  void noplotter();
255 };
256 
257 
258 
259 } //# NAMESPACE CASACORE - END
260 
261 #endif
casacore::PGPlotterNull::circ
virtual void circ(Float xcent, Float ycent, Float radius)
casacore::PGPlotterNull::pap
virtual void pap(Float width, Float aspect)
casacore::PGPlotterNull::pt
virtual void pt(const Vector< Float > &xpts, const Vector< Float > &ypts, Int symbol)
casacore::Matrix< Float >
casacore::PGPlotterNull::swin
virtual void swin(Float x1, Float x2, Float y1, Float y2)
casacore::PGPlotterNull::beenWarned
Bool beenWarned
Definition: PGPlotterNull.h:253
casacore::PGPlotterNull::qfs
virtual Int qfs()
casacore::PGPlotterNull::qlw
virtual Int qlw()
casacore::PGPlotterNull::errb
virtual void errb(Int dir, const Vector< Float > &x, const Vector< Float > &y, const Vector< Float > &e, Float t)
casacore::PGPlotterNull::ask
virtual void ask(Bool flag)
casacore::PGPlotterNull::qtxt
virtual Vector< Float > qtxt(Float x, Float y, Float angle, Float fjust, const String &text)
casacore::PGPlotterNull::numb
virtual String numb(Int mm, Int pp, Int form)
casacore::PGPlotterNull::~PGPlotterNull
virtual ~PGPlotterNull()
The destructor closes the pgplot device.
casacore::PGPlotterNull::bin
virtual void bin(const Vector< Float > &x, const Vector< Float > &data, Bool center)
casacore::PGPlotterNull::sfs
virtual void sfs(Int fs)
casacore::PGPlotterNull::qhs
virtual Vector< Float > qhs()
casacore::PGPlotterNull::sci
virtual void sci(Int ci)
casacore::PGPlotterNull::lab
virtual void lab(const String &xlbl, const String &ylbl, const String &toplbl)
casacore::PGPlotterNull::createPlotter
static PGPlotter createPlotter(const String &device, uInt, uInt, uInt, uInt)
The create function to create a PGPlotter object using a PGPlotterNull.
casacore::PGPlotterNull::draw
virtual void draw(Float x, Float y)
casacore::PGPlotterNull::gray
virtual void gray(const Matrix< Float > &a, Float fg, Float bg, const Vector< Float > &tr)
casacore::PGPlotterNull::imag
virtual void imag(const Matrix< Float > &a, Float a1, Float a2, const Vector< Float > &tr)
casacore::PGPlotterNull::panl
virtual void panl(Int ix, Int iy)
casacore::PGPlotterNull::shs
virtual void shs(Float angle, Float sepn, Float phase)
casacore::PGPlotterNull::qwin
virtual Vector< Float > qwin()
casacore::PGPlotterNull::scr
virtual void scr(Int ci, Float cr, Float cg, Float cb)
casacore::PGPlotterNull::slw
virtual void slw(Int lw)
casacore::PGPlotterNull::sls
virtual void sls(Int ls)
casacore::PGPlotterNull::tbox
virtual void tbox(const String &xopt, Float xtick, Int nxsub, const String &yopt, Float ytick, Int nysub)
casacore::PGPlotterNull::ptxt
virtual void ptxt(Float x, Float y, Float angle, Float fjust, const String &text)
casacore::PGPlotterNull::qcr
virtual Vector< Float > qcr(Int ci)
casacore::PGPlotterNull::shls
virtual void shls(Int ci, Float ch, Float cl, Float cs)
casacore::PGPlotterNull::errx
virtual void errx(const Vector< Float > &x1, const Vector< Float > &x2, const Vector< Float > &y, Float t)
casacore::PGPlotterNull::save
virtual void save()
casacore::PGPlotterNull::line
virtual void line(const Vector< Float > &xpts, const Vector< Float > &ypts)
casacore::PGPlotterNull::box
virtual void box(const String &xopt, Float xtick, Int nxsub, const String &yopt, Float ytick, Int nysub)
casacore::PGPlotterNull::mtxt
virtual void mtxt(const String &side, Float disp, Float coord, Float fjust, const String &text)
casacore::PGPlotterNull
Plot to a PGPLOT device "local" to this process.
Definition: PGPlotterNull.h:90
casacore::PGPlotterNull::pnts
virtual void pnts(const Vector< Float > &x, const Vector< Float > &y, const Vector< Int > symbol)
casacore::PGPlotterInterface
Abstract base class for PGPLOT style plotting.
Definition: PGPlotterInterface.h:104
casacore::PGPlotterNull::move
virtual void move(Float x, Float y)
casacore::PGPlotterNull::qch
virtual Float qch()
casacore::PGPlotterNull::ebuf
virtual void ebuf()
casacore::Float
float Float
Definition: aipstype.h:54
casacore::PGPlotterNull::pixl
virtual void pixl(const Matrix< Int > &ia, Float x1, Float x2, Float y1, Float y2)
casacore::PGPlotterNull::qitf
virtual Int qitf()
casacore::PGPlotterNull::qpos
virtual Vector< Float > qpos()
casacore::PGPlotterNull::scf
virtual void scf(Int font)
casacore::PGPlotterNull::qvsz
virtual Vector< Float > qvsz(Int units)
casacore::PGPlotterNull::bbuf
virtual void bbuf()
casacore::PGPlotterNull::ctab
virtual void ctab(const Vector< Float > &l, const Vector< Float > &r, const Vector< Float > &g, const Vector< Float > &b, Float contra, Float bright)
casacore::PGPlotterNull::qls
virtual Int qls()
casacore::uInt
unsigned int uInt
Definition: aipstype.h:51
casacore::PGPlotterNull::rnge
virtual Vector< Float > rnge(Float x1, Float x2)
casacore::PGPlotterNull::PGPlotterNull
PGPlotterNull(const PGPlotterNull &)
Undefined and inaccessible.
casacore::PGPlotterNull::qinf
virtual String qinf(const String &item)
casacore::PGPlotterNull::wedg
virtual void wedg(const String &side, Float disp, Float width, Float fg, Float bg, const String &label)
casacore::PGPlotterNull::operator=
PGPlotterNull & operator=(const PGPlotterNull &)
casacore::PGPlotterNull::len
virtual Vector< Float > len(Int units, const String &string)
casacore::PGPlotterNull::qcol
virtual Vector< Int > qcol()
casacore::PGPlotterNull::eras
virtual void eras()
casacore::Int
int Int
Definition: aipstype.h:50
casacore
this file contains all the compiler specific defines
Definition: mainpage.dox:28
casacore::PGPlotterNull::qid
virtual Int qid()
casacore::PGPlotterNull::qvp
virtual Vector< Float > qvp(Int units)
casacore::PGPlotterNull::vect
virtual void vect(const Matrix< Float > &a, const Matrix< Float > &b, Float c, Int nc, const Vector< Float > &tr, Float blank)
casacore::PGPlotterNull::id_p
int id_p
PGPLOT id.
Definition: PGPlotterNull.h:252
casacore::PGPlotterNull::wnad
virtual void wnad(Float x1, Float x2, Float y1, Float y2)
casacore::C::c
const Double c
Fundamental physical constants (SI units):
casacore::PGPlotterNull::scir
virtual void scir(Int icilo, Int icihi)
casacore::phase
TableExprNode phase(const TableExprNode &node)
The phase (i.e.
Definition: ExprNode.h:1405
casacore::PGPlotterNull::poly
virtual void poly(const Vector< Float > &xpts, const Vector< Float > &ypts)
casacore::PGPlotterNull::scrn
virtual void scrn(Int ci, const String &name)
casacore::PGPlotterNull::stbg
virtual void stbg(Int tbci)
casacore::PGPlotterNull::PGPlotterNull
PGPlotterNull(const String &device)
Open "device", which must be a valid PGPLOT style device, for example /cps for colour postscript (or ...
casacore::PGPlotterNull::cons
virtual void cons(const Matrix< Float > &a, const Vector< Float > &c, const Vector< Float > &tr)
casacore::PGPlotterNull::vsiz
virtual void vsiz(Float xleft, Float xright, Float ybot, Float ytop)
casacore::C::e
const Double e
e and functions thereof:
casacore::PGPlotterNull::sch
virtual void sch(Float size)
casacore::PGPlotterNull::page
virtual void page()
casacore::PGPlotterNull::env
virtual void env(Float xmin, Float xmax, Float ymin, Float ymax, Int just, Int axis)
casacore::PGPlotterNull::iden
virtual void iden()
casacore::PGPlotterNull::vstd
virtual void vstd()
casacore::String
String: the storage and methods of handling collections of characters.
Definition: String.h:223
casacore::Bool
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::PGPlotterNull::hist
virtual void hist(const Vector< Float > &data, Float datmin, Float datmax, Int nbin, Int pcflag)
casacore::PGPlotterNull::curs
virtual Record curs(Float x, Float y)
This is an emulated standard PGPLOT command.
casacore::PGPlotterNull::conl
virtual void conl(const Matrix< Float > &a, Float c, const Vector< Float > &tr, const String &label, Int intval, Int minint)
casacore::Record
A hierarchical collection of named fields of various types.
Definition: Record.h:181
casacore::PGPlotterNull::erry
virtual void erry(const Vector< Float > &x, const Vector< Float > &y1, const Vector< Float > &y2, Float t)
casacore::PGPlotterNull::qcir
virtual Vector< Int > qcir()
casacore::PGPlotterNull::noplotter
void noplotter()
casacore::PGPlotterNull::qah
virtual Vector< Float > qah()
casacore::PGPlotterNull::cont
virtual void cont(const Matrix< Float > &a, const Vector< Float > &c, Bool nc, const Vector< Float > &tr)
casacore::PGPlotterNull::updt
virtual void updt()
casacore::PGPlotterNull::sitf
virtual void sitf(Int itf)
casacore::Vector< Float >
casacore::PGPlotterNull::rnd
virtual Float rnd(Float x, Int nsub)
casacore::PGPlotter
Standard plotting object for application programmers.
Definition: PGPlotter.h:96
casacore::PGPlotterNull::sah
virtual void sah(Int fs, Float angle, Float vent)
casacore::PGPlotterNull::subp
virtual void subp(Int nxsub, Int nysub)
casacore::PGPlotterNull::qcs
virtual Vector< Float > qcs(Int units)
casacore::PGPlotterNull::qtbg
virtual Int qtbg()
casacore::PGPlotterNull::qci
virtual Int qci()
casacore::PGPlotterNull::svp
virtual void svp(Float xleft, Float xright, Float ybot, Float ytop)
casacore::PGPlotterNull::qcf
virtual Int qcf()
casacore::PGPlotterNull::conb
virtual void conb(const Matrix< Float > &a, const Vector< Float > &c, const Vector< Float > &tr, Float blank)
casacore::PGPlotterNull::rect
virtual void rect(Float x1, Float x2, Float y1, Float y2)
casacore::PGPlotterNull::arro
virtual void arro(Float x1, Float y1, Float x2, Float y2)
Standard PGPLOT commands.
casacore::PGPlotterNull::unsa
virtual void unsa()
casacore::PGPlotterNull::text
virtual void text(Float x, Float y, const String &text)
casacore::PGPlotterNull::hi2d
virtual void hi2d(const Matrix< Float > &data, const Vector< Float > &x, Int ioff, Float bias, Bool center, const Vector< Float > &ylims)
casacore::PGPlotterNull::ldev
virtual void ldev()