casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
casa::PGPlotterLocal Class Reference

Plot to a PGPLOT device "local" to this process. More...

#include <PGPlotterLocal.h>

Inheritance diagram for casa::PGPlotterLocal:
casa::PGPlotterInterface

List of all members.

Public Member Functions

 PGPlotterLocal (const String &device)
 Open "device", which must be a valid PGPLOT style device, for example /cps for colour postscript (or myfile.ps/cps if you want to name the file), or /xs or /xw for and X-windows display.
virtual ~PGPlotterLocal ()
 The destructor closes the pgplot device.
virtual Record curs (Float x, Float y)
 This is an emulated standard PGPLOT command.
virtual void arro (Float x1, Float y1, Float x2, Float y2)
 Standard PGPLOT commands.
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< Floatlen (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< Floatqah ()
virtual Int qcf ()
virtual Float qch ()
virtual Int qci ()
virtual Vector< Intqcir ()
virtual Vector< Intqcol ()
virtual Vector< Floatqcr (Int ci)
virtual Vector< Floatqcs (Int units)
virtual Int qfs ()
virtual Vector< Floatqhs ()
virtual Int qid ()
virtual String qinf (const String &item)
virtual Int qitf ()
virtual Int qls ()
virtual Int qlw ()
virtual Vector< Floatqpos ()
virtual Int qtbg ()
virtual Vector< Floatqtxt (Float x, Float y, Float angle, Float fjust, const String &text)
virtual Vector< Floatqvp (Int units)
virtual Vector< Floatqvsz (Int units)
virtual Vector< Floatqwin ()
virtual void rect (Float x1, Float x2, Float y1, Float y2)
virtual Float rnd (Float x, Int nsub)
virtual Vector< Floatrnge (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)

Static Public Member Functions

static PGPlotter createPlotter (const String &device, uInt, uInt, uInt, uInt)
 The create function to create a PGPlotter object using a PGPlotterLocal.

Private Member Functions

 PGPlotterLocal (const PGPlotterLocal &)
 
     

PGPlotterLocaloperator= (const PGPlotterLocal &)

Private Attributes

int id_p
 PGPLOT id.

Detailed Description

Plot to a PGPLOT device "local" to this process.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

"Local" is used to denote that the actuall plotting is done by PGPLOT calls linked into this executable, as opposed to the common case where the PGPLOT calls are sent over the Glish bus to a "remote" display.

Synopsis

Generally programmers should not use this class, instead they should use PGPlotter instead.

This class make a concrete PGPlotterInterface object which calls PGPLOT directly, i.e. PGPLOT is linked into the current executable.

Example

        // plot y = x*x
        Vector<Float> x(100), y(100);
        indgen(x);
        y = x*x;
   
        PGPlotterLocal plotter("myplot.ps/ps");
        plotter.env(0, 100, 0, 100*100, 0, 0);
        plotter.line(x, y);

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.

To Do

Definition at line 91 of file PGPlotterLocal.h.


Constructor & Destructor Documentation

Open "device", which must be a valid PGPLOT style device, for example /cps for colour postscript (or myfile.ps/cps if you want to name the file), or /xs or /xw for and X-windows display.

Thrown Exceptions

  • An AipsError will be thrown if the underlying PGPLOT open fails for some reason.

The destructor closes the pgplot device.

     

Undefined and inaccessible


Member Function Documentation

virtual void casa::PGPlotterLocal::arro ( Float  x1,
Float  y1,
Float  x2,
Float  y2 
) [virtual]

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 http://astro.caltech.edu/~tjp/pgplot/. 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).

Implements casa::PGPlotterInterface.

virtual void casa::PGPlotterLocal::ask ( Bool  flag) [virtual]
virtual void casa::PGPlotterLocal::bbuf ( ) [virtual]
virtual void casa::PGPlotterLocal::bin ( const Vector< Float > &  x,
const Vector< Float > &  data,
Bool  center 
) [virtual]
virtual void casa::PGPlotterLocal::box ( const String xopt,
Float  xtick,
Int  nxsub,
const String yopt,
Float  ytick,
Int  nysub 
) [virtual]
virtual void casa::PGPlotterLocal::circ ( Float  xcent,
Float  ycent,
Float  radius 
) [virtual]
virtual void casa::PGPlotterLocal::conb ( const Matrix< Float > &  a,
const Vector< Float > &  c,
const Vector< Float > &  tr,
Float  blank 
) [virtual]
virtual void casa::PGPlotterLocal::conl ( const Matrix< Float > &  a,
Float  c,
const Vector< Float > &  tr,
const String label,
Int  intval,
Int  minint 
) [virtual]
virtual void casa::PGPlotterLocal::cons ( const Matrix< Float > &  a,
const Vector< Float > &  c,
const Vector< Float > &  tr 
) [virtual]
virtual void casa::PGPlotterLocal::cont ( const Matrix< Float > &  a,
const Vector< Float > &  c,
Bool  nc,
const Vector< Float > &  tr 
) [virtual]
static PGPlotter casa::PGPlotterLocal::createPlotter ( const String device,
uInt  ,
uInt  ,
uInt  ,
uInt   
) [static]

The create function to create a PGPlotter object using a PGPlotterLocal.

It only uses the device argument.

virtual void casa::PGPlotterLocal::ctab ( const Vector< Float > &  l,
const Vector< Float > &  r,
const Vector< Float > &  g,
const Vector< Float > &  b,
Float  contra,
Float  bright 
) [virtual]
virtual Record casa::PGPlotterLocal::curs ( Float  x,
Float  y 
) [virtual]

This is an emulated standard PGPLOT command.

It returns a record containing the fields:

        [ok=Bool, x=Float, y=Float, ch=String];
        If the remote device cannot do cursor feedback, ok==F.

Implements casa::PGPlotterInterface.

virtual void casa::PGPlotterLocal::draw ( Float  x,
Float  y 
) [virtual]
virtual void casa::PGPlotterLocal::ebuf ( ) [virtual]
virtual void casa::PGPlotterLocal::env ( Float  xmin,
Float  xmax,
Float  ymin,
Float  ymax,
Int  just,
Int  axis 
) [virtual]
virtual void casa::PGPlotterLocal::eras ( ) [virtual]
virtual void casa::PGPlotterLocal::errb ( Int  dir,
const Vector< Float > &  x,
const Vector< Float > &  y,
const Vector< Float > &  e,
Float  t 
) [virtual]
virtual void casa::PGPlotterLocal::errx ( const Vector< Float > &  x1,
const Vector< Float > &  x2,
const Vector< Float > &  y,
Float  t 
) [virtual]
virtual void casa::PGPlotterLocal::erry ( const Vector< Float > &  x,
const Vector< Float > &  y1,
const Vector< Float > &  y2,
Float  t 
) [virtual]
virtual void casa::PGPlotterLocal::gray ( const Matrix< Float > &  a,
Float  fg,
Float  bg,
const Vector< Float > &  tr 
) [virtual]
virtual void casa::PGPlotterLocal::hi2d ( const Matrix< Float > &  data,
const Vector< Float > &  x,
Int  ioff,
Float  bias,
Bool  center,
const Vector< Float > &  ylims 
) [virtual]
virtual void casa::PGPlotterLocal::hist ( const Vector< Float > &  data,
Float  datmin,
Float  datmax,
Int  nbin,
Int  pcflag 
) [virtual]
virtual void casa::PGPlotterLocal::iden ( ) [virtual]
virtual void casa::PGPlotterLocal::imag ( const Matrix< Float > &  a,
Float  a1,
Float  a2,
const Vector< Float > &  tr 
) [virtual]
virtual void casa::PGPlotterLocal::lab ( const String xlbl,
const String ylbl,
const String toplbl 
) [virtual]
virtual void casa::PGPlotterLocal::ldev ( ) [virtual]
virtual Vector<Float> casa::PGPlotterLocal::len ( Int  units,
const String string 
) [virtual]
virtual void casa::PGPlotterLocal::line ( const Vector< Float > &  xpts,
const Vector< Float > &  ypts 
) [virtual]
virtual void casa::PGPlotterLocal::move ( Float  x,
Float  y 
) [virtual]
virtual void casa::PGPlotterLocal::mtxt ( const String side,
Float  disp,
Float  coord,
Float  fjust,
const String text 
) [virtual]
virtual String casa::PGPlotterLocal::numb ( Int  mm,
Int  pp,
Int  form 
) [virtual]
PGPlotterLocal& casa::PGPlotterLocal::operator= ( const PGPlotterLocal ) [private]
virtual void casa::PGPlotterLocal::page ( ) [virtual]
virtual void casa::PGPlotterLocal::panl ( Int  ix,
Int  iy 
) [virtual]
virtual void casa::PGPlotterLocal::pap ( Float  width,
Float  aspect 
) [virtual]
virtual void casa::PGPlotterLocal::pixl ( const Matrix< Int > &  ia,
Float  x1,
Float  x2,
Float  y1,
Float  y2 
) [virtual]
virtual void casa::PGPlotterLocal::pnts ( const Vector< Float > &  x,
const Vector< Float > &  y,
const Vector< Int symbol 
) [virtual]
virtual void casa::PGPlotterLocal::poly ( const Vector< Float > &  xpts,
const Vector< Float > &  ypts 
) [virtual]
virtual void casa::PGPlotterLocal::pt ( const Vector< Float > &  xpts,
const Vector< Float > &  ypts,
Int  symbol 
) [virtual]
virtual void casa::PGPlotterLocal::ptxt ( Float  x,
Float  y,
Float  angle,
Float  fjust,
const String text 
) [virtual]
virtual Vector<Float> casa::PGPlotterLocal::qah ( ) [virtual]
virtual Int casa::PGPlotterLocal::qcf ( ) [virtual]
virtual Float casa::PGPlotterLocal::qch ( ) [virtual]
virtual Int casa::PGPlotterLocal::qci ( ) [virtual]
virtual Vector<Int> casa::PGPlotterLocal::qcir ( ) [virtual]
virtual Vector<Int> casa::PGPlotterLocal::qcol ( ) [virtual]
virtual Vector<Float> casa::PGPlotterLocal::qcr ( Int  ci) [virtual]
virtual Vector<Float> casa::PGPlotterLocal::qcs ( Int  units) [virtual]
virtual Int casa::PGPlotterLocal::qfs ( ) [virtual]
virtual Vector<Float> casa::PGPlotterLocal::qhs ( ) [virtual]
virtual Int casa::PGPlotterLocal::qid ( ) [virtual]
virtual String casa::PGPlotterLocal::qinf ( const String item) [virtual]
virtual Int casa::PGPlotterLocal::qitf ( ) [virtual]
virtual Int casa::PGPlotterLocal::qls ( ) [virtual]
virtual Int casa::PGPlotterLocal::qlw ( ) [virtual]
virtual Vector<Float> casa::PGPlotterLocal::qpos ( ) [virtual]
virtual Int casa::PGPlotterLocal::qtbg ( ) [virtual]
virtual Vector<Float> casa::PGPlotterLocal::qtxt ( Float  x,
Float  y,
Float  angle,
Float  fjust,
const String text 
) [virtual]
virtual Vector<Float> casa::PGPlotterLocal::qvp ( Int  units) [virtual]
virtual Vector<Float> casa::PGPlotterLocal::qvsz ( Int  units) [virtual]
virtual Vector<Float> casa::PGPlotterLocal::qwin ( ) [virtual]
virtual void casa::PGPlotterLocal::rect ( Float  x1,
Float  x2,
Float  y1,
Float  y2 
) [virtual]
virtual Float casa::PGPlotterLocal::rnd ( Float  x,
Int  nsub 
) [virtual]
virtual Vector<Float> casa::PGPlotterLocal::rnge ( Float  x1,
Float  x2 
) [virtual]
virtual void casa::PGPlotterLocal::sah ( Int  fs,
Float  angle,
Float  vent 
) [virtual]
virtual void casa::PGPlotterLocal::save ( ) [virtual]
virtual void casa::PGPlotterLocal::scf ( Int  font) [virtual]
virtual void casa::PGPlotterLocal::sch ( Float  size) [virtual]
virtual void casa::PGPlotterLocal::sci ( Int  ci) [virtual]
virtual void casa::PGPlotterLocal::scir ( Int  icilo,
Int  icihi 
) [virtual]
virtual void casa::PGPlotterLocal::scr ( Int  ci,
Float  cr,
Float  cg,
Float  cb 
) [virtual]
virtual void casa::PGPlotterLocal::scrn ( Int  ci,
const String name 
) [virtual]
virtual void casa::PGPlotterLocal::sfs ( Int  fs) [virtual]
virtual void casa::PGPlotterLocal::shls ( Int  ci,
Float  ch,
Float  cl,
Float  cs 
) [virtual]
virtual void casa::PGPlotterLocal::shs ( Float  angle,
Float  sepn,
Float  phase 
) [virtual]
virtual void casa::PGPlotterLocal::sitf ( Int  itf) [virtual]
virtual void casa::PGPlotterLocal::sls ( Int  ls) [virtual]
virtual void casa::PGPlotterLocal::slw ( Int  lw) [virtual]
virtual void casa::PGPlotterLocal::stbg ( Int  tbci) [virtual]
virtual void casa::PGPlotterLocal::subp ( Int  nxsub,
Int  nysub 
) [virtual]
virtual void casa::PGPlotterLocal::svp ( Float  xleft,
Float  xright,
Float  ybot,
Float  ytop 
) [virtual]
virtual void casa::PGPlotterLocal::swin ( Float  x1,
Float  x2,
Float  y1,
Float  y2 
) [virtual]
virtual void casa::PGPlotterLocal::tbox ( const String xopt,
Float  xtick,
Int  nxsub,
const String yopt,
Float  ytick,
Int  nysub 
) [virtual]
virtual void casa::PGPlotterLocal::text ( Float  x,
Float  y,
const String text 
) [virtual]
virtual void casa::PGPlotterLocal::unsa ( ) [virtual]
virtual void casa::PGPlotterLocal::updt ( ) [virtual]
virtual void casa::PGPlotterLocal::vect ( const Matrix< Float > &  a,
const Matrix< Float > &  b,
Float  c,
Int  nc,
const Vector< Float > &  tr,
Float  blank 
) [virtual]
virtual void casa::PGPlotterLocal::vsiz ( Float  xleft,
Float  xright,
Float  ybot,
Float  ytop 
) [virtual]
virtual void casa::PGPlotterLocal::vstd ( ) [virtual]
virtual void casa::PGPlotterLocal::wedg ( const String side,
Float  disp,
Float  width,
Float  fg,
Float  bg,
const String label 
) [virtual]
virtual void casa::PGPlotterLocal::wnad ( Float  x1,
Float  x2,
Float  y1,
Float  y2 
) [virtual]

Member Data Documentation

PGPLOT id.

Definition at line 254 of file PGPlotterLocal.h.


The documentation for this class was generated from the following file: