Loading...
Searching...
No Matches
PGPlotterNull.h
Go to the documentation of this file.
//# PGPlotterNull.h: Plot to a PGPLOT device "null" to this process.
//# Copyright (C) 1997,2001
//# Associated Universities, Inc. Washington DC, USA.
//#
//# This library is free software; you can redistribute it and/or modify it
//# under the terms of the GNU Library General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or (at your
//# option) any later version.
//#
//# This library is distributed in the hope that it will be useful, but WITHOUT
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
//# License for more details.
//#
//# You should have received a copy of the GNU Library General Public License
//# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//#
//# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: casa-feedback@nrao.edu.
//# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory
//# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA
#ifndef GRAPHICS_PGPLOTTERNULL_H
#define GRAPHICS_PGPLOTTERNULL_H
#include <casacore/casa/aips.h>
#include <casacore/casa/Arrays/ArrayFwd.h>
#include <casacore/casa/System/PGPlotter.h>
namespace casacore { //# NAMESPACE CASACORE - BEGIN
class String;
// <summary>
// Plot to a PGPLOT device "local" to this process.
// </summary>
// <use visibility=export>
// <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
// </reviewed>
// <prerequisite>
// <li> <linkto class="PGPlotterInterface">PGPlotterInterface</linkto>
// </prerequisite>
//
// <etymology>
// "Null" is used to denote that no plotting is done
// </etymology>
//
// <synopsis>
// Generally programmers should not use this class, instead they should use
// <linkto class="PGPlotter">PGPlotter</linkto> instead.
//
// This class make a concrete
// <linkto class="PGPlotterInterface">PGPlotterInterface</linkto> object which
// calls PGPLOT directly, i.e. PGPLOT is linked into the current executable.
// </synopsis>
//
// <example>
// <srcblock>
// // plot y = x*x
// Vector<Float> x(100), y(100);
// indgen(x);
// y = x*x;
// PGPlotterNull plotter("myplot.ps/ps");
// plotter.env(0, 100, 0, 100*100, 0, 0);
// plotter.line(x, y);
// </srcblock>
// </example>
//
// <motivation>
// It might be necessary to call PGPLOT directly in some circumstances. For
// example, it might be too inefficient to pass a lot of Image data over the
// glish bus.
// </motivation>
//
// <todo asof="1997/12/31">
// <li> Add more plot calls.
// </todo>
class PGPlotterNull : public PGPlotterInterface
{
public:
// Open "device", which must be a valid PGPLOT style device, for example
// <src>/cps</src> for colour postscript (or <src>myfile.ps/cps</src>
// if you want to name the file), or <src>/xs</src> or <src>/xw</src> for
// and X-windows display.
// <thrown>
// <li> An <linkto class="AipsError">AipsError</linkto> will be thrown
// if the underlying PGPLOT open fails for some reason.
// </thrown>
PGPlotterNull(const String &device);
// The destructor closes the pgplot device.
virtual ~PGPlotterNull();
// The create function to create a PGPlotter object using a PGPlotterNull.
// It only uses the device argument.
static PGPlotter createPlotter (const String &device,
uInt, uInt, uInt, uInt);
// This is an emulated standard PGPLOT command. It returns a record
// containing the fields:
// <srcblock>
// [ok=Bool, x=Float, y=Float, ch=String];
// If the remote device cannot do cursor feedback, ok==F.
// </srcblock>
virtual Record curs(Float x, Float y);
// Standard PGPLOT commands. Documentation for the individual commands
// can be found in the Glish manual and in the standard PGPLOT documentation
// which may be found at <src>http://astro.caltech.edu/~tjp/pgplot/</src>.
// The Glish/PGPLOT documentation is preferred since this interface follows
// it exactly (e.g. the array sizes are inferred both here and in Glish,
// whereas they must be passed into standard PGPLOT).
// <group>
virtual void arro(Float x1, Float y1, Float x2, Float y2);
virtual void ask(Bool flag);
virtual void bbuf();
virtual void bin(const Vector<Float> &x, const Vector<Float> &data,
Bool center);
virtual void box(const String &xopt, Float xtick, Int nxsub,
const String &yopt, Float ytick, Int nysub);
virtual void circ(Float xcent, Float ycent, Float radius);
virtual void conb(const Matrix<Float> &a, const Vector<Float> &c,
const Vector<Float> &tr, Float blank);
virtual void conl(const Matrix<Float> &a, Float c,
const Vector<Float> &tr, const String &label,
Int intval, Int minint);
virtual void cons(const Matrix<Float> &a, const Vector<Float> &c,
const Vector<Float> &tr);
virtual void cont(const Matrix<Float> &a, const Vector<Float> &c,
Bool nc, const Vector<Float> &tr);
virtual void ctab(const Vector<Float> &l, const Vector<Float> &r,
const Vector<Float> &g, const Vector<Float> &b,
Float contra, Float bright);
virtual void draw(Float x, Float y);
virtual void ebuf();
virtual void env(Float xmin, Float xmax, Float ymin, Float ymax, Int just,
Int axis);
virtual void eras();
virtual void errb(Int dir, const Vector<Float> &x, const Vector<Float> &y,
const Vector<Float> &e, Float t);
virtual void errx(const Vector<Float> &x1, const Vector<Float> &x2,
const Vector<Float> &y, Float t);
virtual void erry(const Vector<Float> &x, const Vector<Float> &y1,
const Vector<Float> &y2, Float t);
virtual void gray(const Matrix<Float> &a, Float fg, Float bg,
const Vector<Float> &tr);
virtual void hi2d(const Matrix<Float> &data, const Vector<Float> &x,
Int ioff, Float bias, Bool center,
const Vector<Float> &ylims);
virtual void hist(const Vector<Float> &data, Float datmin, Float datmax,
Int nbin, Int pcflag);
virtual void iden();
virtual void imag(const Matrix<Float> &a, Float a1, Float a2,
const Vector<Float> &tr);
virtual void lab(const String &xlbl, const String &ylbl,
const String &toplbl);
virtual void ldev();
virtual Vector<Float> len(Int units, const String &string);
virtual void line(const Vector<Float> &xpts, const Vector<Float> &ypts);
virtual void move(Float x, Float y);
virtual void mtxt(const String &side, Float disp, Float coord, Float fjust,
const String &text);
virtual String numb(Int mm, Int pp, Int form);
virtual void page();
virtual void panl(Int ix, Int iy);
virtual void pap(Float width, Float aspect);
virtual void pixl(const Matrix<Int> &ia, Float x1, Float x2,
Float y1, Float y2);
virtual void pnts(const Vector<Float> &x, const Vector<Float> &y,
const Vector<Int> symbol);
virtual void poly(const Vector<Float> &xpts, const Vector<Float> &ypts);
virtual void pt(const Vector<Float> &xpts, const Vector<Float> &ypts,
Int symbol);
virtual void ptxt(Float x, Float y, Float angle, Float fjust,
const String &text);
virtual Vector<Float> qah();
virtual Int qcf();
virtual Float qch();
virtual Int qci();
virtual Vector<Int> qcir();
virtual Vector<Int> qcol();
virtual Vector<Float> qcr(Int ci);
virtual Vector<Float> qcs(Int units);
virtual Int qfs();
virtual Vector<Float> qhs();
virtual Int qid();
virtual String qinf(const String &item);
virtual Int qitf();
virtual Int qls();
virtual Int qlw();
virtual Vector<Float> qpos();
virtual Int qtbg();
virtual Vector<Float> qtxt(Float x, Float y, Float angle, Float fjust,
const String &text);
virtual Vector<Float> qvp(Int units);
virtual Vector<Float> qvsz(Int units);
virtual Vector<Float> qwin();
virtual void rect(Float x1, Float x2, Float y1, Float y2);
virtual Float rnd(Float x, Int nsub);
virtual Vector<Float> rnge(Float x1, Float x2);
virtual void sah(Int fs, Float angle, Float vent);
virtual void save();
virtual void scf(Int font);
virtual void sch(Float size);
virtual void sci(Int ci);
virtual void scir(Int icilo, Int icihi);
virtual void scr(Int ci, Float cr, Float cg, Float cb);
virtual void scrn(Int ci, const String &name);
virtual void sfs(Int fs);
virtual void shls(Int ci, Float ch, Float cl, Float cs);
virtual void shs(Float angle, Float sepn, Float phase);
virtual void sitf(Int itf);
virtual void sls(Int ls);
virtual void slw(Int lw);
virtual void stbg(Int tbci);
virtual void subp(Int nxsub, Int nysub);
virtual void svp(Float xleft, Float xright, Float ybot, Float ytop);
virtual void swin(Float x1, Float x2, Float y1, Float y2);
virtual void tbox(const String &xopt, Float xtick, Int nxsub,
const String &yopt, Float ytick, Int nysub);
virtual void text(Float x, Float y, const String &text);
virtual void unsa();
virtual void updt();
virtual void vect(const Matrix<Float> &a, const Matrix<Float> &b,
Float c, Int nc,
const Vector<Float> &tr, Float blank);
virtual void vsiz(Float xleft, Float xright, Float ybot,
Float ytop);
virtual void vstd();
virtual void wedg(const String &side, Float disp, Float width,
Float fg, Float bg, const String &label);
virtual void wnad(Float x1, Float x2, Float y1, Float y2);
// </group>
private:
// Undefined and inaccessible
PGPlotterNull(const PGPlotterNull &);
PGPlotterNull& operator=(const PGPlotterNull &);
// PGPLOT id
int id_p;
Bool beenWarned;
void noplotter();
};
} //# NAMESPACE CASACORE - END
#endif
casacore::Matrix
Definition Matrix.h:87
casacore::PGPlotterInterface
Definition PGPlotterInterface.h:100
casacore::PGPlotterNull::PGPlotterNull
PGPlotterNull(const PGPlotterNull &)
Undefined and inaccessible.
casacore::PGPlotterNull::qlw
virtual Int qlw()
casacore::PGPlotterNull::slw
virtual void slw(Int lw)
casacore::PGPlotterNull::numb
virtual String numb(Int mm, Int pp, Int form)
casacore::PGPlotterNull::stbg
virtual void stbg(Int tbci)
casacore::PGPlotterNull::qid
virtual Int qid()
casacore::PGPlotterNull::sah
virtual void sah(Int fs, Float angle, Float vent)
casacore::PGPlotterNull::ask
virtual void ask(Bool flag)
casacore::PGPlotterNull::panl
virtual void panl(Int ix, Int iy)
casacore::PGPlotterNull::qcol
virtual Vector< Int > qcol()
casacore::PGPlotterNull::qls
virtual Int qls()
casacore::PGPlotterNull::qcir
virtual Vector< Int > qcir()
casacore::PGPlotterNull::shs
virtual void shs(Float angle, Float sepn, Float phase)
casacore::PGPlotterNull::save
virtual void save()
casacore::PGPlotterNull::qwin
virtual Vector< Float > qwin()
casacore::PGPlotterNull::gray
virtual void gray(const Matrix< Float > &a, Float fg, Float bg, const Vector< Float > &tr)
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::sci
virtual void sci(Int ci)
casacore::PGPlotterNull::svp
virtual void svp(Float xleft, Float xright, Float ybot, Float ytop)
casacore::PGPlotterNull::scr
virtual void scr(Int ci, Float cr, Float cg, Float cb)
casacore::PGPlotterNull::qinf
virtual String qinf(const String &item)
casacore::PGPlotterNull::qvsz
virtual Vector< Float > qvsz(Int units)
casacore::PGPlotterNull::conl
virtual void conl(const Matrix< Float > &a, Float c, const Vector< Float > &tr, const String &label, Int intval, Int minint)
casacore::PGPlotterNull::qtbg
virtual Int qtbg()
casacore::PGPlotterNull::text
virtual void text(Float x, Float y, const String &text)
casacore::PGPlotterNull::updt
virtual void updt()
casacore::PGPlotterNull::poly
virtual void poly(const Vector< Float > &xpts, const Vector< Float > &ypts)
casacore::PGPlotterNull::tbox
virtual void tbox(const String &xopt, Float xtick, Int nxsub, const String &yopt, Float ytick, Int nysub)
casacore::PGPlotterNull::curs
virtual Record curs(Float x, Float y)
This is an emulated standard PGPLOT command.
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::id_p
int id_p
PGPLOT id.
Definition PGPlotterNull.h:249
casacore::PGPlotterNull::qitf
virtual Int qitf()
casacore::PGPlotterNull::qtxt
virtual Vector< Float > qtxt(Float x, Float y, Float angle, Float fjust, const String &text)
casacore::PGPlotterNull::qcr
virtual Vector< Float > qcr(Int ci)
casacore::PGPlotterNull::subp
virtual void subp(Int nxsub, Int nysub)
casacore::PGPlotterNull::erry
virtual void erry(const Vector< Float > &x, const Vector< Float > &y1, const Vector< Float > &y2, Float t)
casacore::PGPlotterNull::sls
virtual void sls(Int ls)
casacore::PGPlotterNull::operator=
PGPlotterNull & operator=(const PGPlotterNull &)
casacore::PGPlotterNull::qcs
virtual Vector< Float > qcs(Int units)
casacore::PGPlotterNull::page
virtual void page()
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::eras
virtual void eras()
casacore::PGPlotterNull::qfs
virtual Int qfs()
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::qpos
virtual Vector< Float > qpos()
casacore::PGPlotterNull::ptxt
virtual void ptxt(Float x, Float y, Float angle, Float fjust, const String &text)
casacore::PGPlotterNull::qcf
virtual Int qcf()
casacore::PGPlotterNull::beenWarned
Bool beenWarned
Definition PGPlotterNull.h:250
casacore::PGPlotterNull::len
virtual Vector< Float > len(Int units, const String &string)
casacore::PGPlotterNull::sch
virtual void sch(Float size)
casacore::PGPlotterNull::env
virtual void env(Float xmin, Float xmax, Float ymin, Float ymax, Int just, Int axis)
casacore::PGPlotterNull::scrn
virtual void scrn(Int ci, const String &name)
casacore::PGPlotterNull::qch
virtual Float qch()
casacore::PGPlotterNull::qah
virtual Vector< Float > qah()
casacore::PGPlotterNull::qvp
virtual Vector< Float > qvp(Int units)
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::errb
virtual void errb(Int dir, const Vector< Float > &x, const Vector< Float > &y, const Vector< Float > &e, Float t)
casacore::PGPlotterNull::wedg
virtual void wedg(const String &side, Float disp, Float width, Float fg, Float bg, const String &label)
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::shls
virtual void shls(Int ci, Float ch, Float cl, Float cs)
casacore::PGPlotterNull::cons
virtual void cons(const Matrix< Float > &a, const Vector< Float > &c, const Vector< Float > &tr)
casacore::PGPlotterNull::arro
virtual void arro(Float x1, Float y1, Float x2, Float y2)
Standard PGPLOT commands.
casacore::PGPlotterNull::errx
virtual void errx(const Vector< Float > &x1, const Vector< Float > &x2, const Vector< Float > &y, Float t)
casacore::PGPlotterNull::cont
virtual void cont(const Matrix< Float > &a, const Vector< Float > &c, Bool nc, const Vector< Float > &tr)
casacore::PGPlotterNull::pap
virtual void pap(Float width, Float aspect)
casacore::PGPlotterNull::imag
virtual void imag(const Matrix< Float > &a, Float a1, Float a2, const Vector< Float > &tr)
casacore::PGPlotterNull::bbuf
virtual void bbuf()
casacore::PGPlotterNull::sfs
virtual void sfs(Int fs)
casacore::PGPlotterNull::noplotter
void noplotter()
casacore::PGPlotterNull::wnad
virtual void wnad(Float x1, Float x2, Float y1, Float y2)
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::pixl
virtual void pixl(const Matrix< Int > &ia, Float x1, Float x2, Float y1, Float y2)
casacore::PGPlotterNull::move
virtual void move(Float x, Float y)
casacore::PGPlotterNull::hist
virtual void hist(const Vector< Float > &data, Float datmin, Float datmax, Int nbin, Int pcflag)
casacore::PGPlotterNull::ebuf
virtual void ebuf()
casacore::PGPlotterNull::draw
virtual void draw(Float x, Float y)
casacore::PGPlotterNull::lab
virtual void lab(const String &xlbl, const String &ylbl, const String &toplbl)
casacore::PGPlotterNull::qhs
virtual Vector< Float > qhs()
casacore::PGPlotterNull::unsa
virtual void unsa()
casacore::PGPlotterNull::swin
virtual void swin(Float x1, Float x2, Float y1, Float y2)
casacore::PGPlotterNull::rnd
virtual Float rnd(Float x, Int nsub)
casacore::PGPlotterNull::conb
virtual void conb(const Matrix< Float > &a, const Vector< Float > &c, const Vector< Float > &tr, Float blank)
casacore::PGPlotterNull::pnts
virtual void pnts(const Vector< Float > &x, const Vector< Float > &y, const Vector< Int > symbol)
casacore::PGPlotterNull::line
virtual void line(const Vector< Float > &xpts, const Vector< Float > &ypts)
casacore::PGPlotterNull::pt
virtual void pt(const Vector< Float > &xpts, const Vector< Float > &ypts, Int symbol)
casacore::PGPlotterNull::vsiz
virtual void vsiz(Float xleft, Float xright, Float ybot, Float ytop)
casacore::PGPlotterNull::scir
virtual void scir(Int icilo, Int icihi)
casacore::PGPlotterNull::ldev
virtual void ldev()
casacore::PGPlotterNull::rect
virtual void rect(Float x1, Float x2, Float y1, Float y2)
casacore::PGPlotterNull::sitf
virtual void sitf(Int itf)
casacore::PGPlotterNull::scf
virtual void scf(Int font)
casacore::PGPlotterNull::iden
virtual void iden()
casacore::PGPlotterNull::rnge
virtual Vector< Float > rnge(Float x1, Float x2)
casacore::PGPlotterNull::circ
virtual void circ(Float xcent, Float ycent, Float radius)
casacore::PGPlotterNull::vstd
virtual void vstd()
casacore::PGPlotterNull::qci
virtual Int qci()
casacore::PGPlotter
Definition PGPlotter.h:93
casacore::String
String: the storage and methods of handling collections of characters.
Definition String.h:223
casacore::Vector
Definition Vector.h:82
casacore::Record
Record()
casacore
this file contains all the compiler specific defines
Definition mainpage.dox:28
casacore::blank
Int blank() const
Definition hdu.h:359
casacore::uInt
unsigned int uInt
Definition aipstype.h:49
casacore::phase
TableExprNode phase(const TableExprNode &node)
The phase (i.e.
Definition ExprNode.h:1452
casacore::Float
float Float
Definition aipstype.h:52
casacore::name
String name() const
Return the name of the field.
Definition RecordField.h:163
casacore::Int
int Int
Definition aipstype.h:48
casacore::Bool
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40
casacore::size
uInt size() const
Definition RecordInterface.h:224