Provides routines to plot two-dimensional parameter meshes.
This header covers routines that display 2-dimensional parameter meshes as generated by the routines in Header TwoDMesh.h. The output is written to a C FILE-type
stream using fprintf(). The routines do not provide a system-level interface to open or close file streams; they simply assume that they have been passed an open, writable stream. Nonetheless, their use of stream I/O means that they cannot be included in LAL (although executables, in particular the Header TwoDMesh.h test programs, may statically link against their object files).
Prototypes | |
void | LALPlotTwoDMesh (LALStatus *stat, FILE *stream, TwoDMeshNode *mesh, TwoDMeshPlotStruc *params) |
Plots a hierarchical mesh of templates on an 2-dimensional parameter space. More... | |
Data Structures | |
struct | TwoDMeshPlotStruc |
This structure stores parameters specifying how to plot a PostScript diagram of the parameter mesh. More... | |
Files | |
file | TwoDMeshTest.c |
Creates a 2-dimensional template mesh for linearly-changing mismatch ellipses. | |
Error Codes | |
#define | TWODMESHPLOTH_ENUL 1 |
#define | TWODMESHPLOTH_EOUT 2 |
#define | TWODMESHPLOTH_EMEM 3 |
#define | TWODMESHPLOTH_EMETRIC 4 |
#define | TWODMESHPLOTH_ENOPLOT 5 |
#define | TWODMESHPLOTH_MSGENUL "Unexpected null pointer in arguments" |
#define | TWODMESHPLOTH_MSGEOUT "Output handle points to a non-null pointer" |
#define | TWODMESHPLOTH_MSGEMEM "Memory allocation error" |
#define | TWODMESHPLOTH_MSGEMETRIC "Non-positive metric" |
#define | TWODMESHPLOTH_MSGENOPLOT "Nothing to plot" |
Constants | |
The values in the table above are stored in the constants | |
#define | TWODMESHPLOTH_XSIZE 540 |
Horizontal size of plotting area (points = \( 1/72'' \) ) More... | |
#define | TWODMESHPLOTH_YSIZE 720 |
Vertical size of plotting area (points) More... | |
#define | TWODMESHPLOTH_XMARG 36 |
Distance from left of page to plotting area (points) More... | |
#define | TWODMESHPLOTH_YMARG 36 |
Distance from bottom of page to plotting area (points) More... | |
void LALPlotTwoDMesh | ( | LALStatus * | stat, |
FILE * | stream, | ||
TwoDMeshNode * | mesh, | ||
TwoDMeshPlotStruc * | params | ||
) |
Plots a hierarchical mesh of templates on an 2-dimensional parameter space.
This routine creates a PostScript plot of the parameter mesh list pointed to by mesh
, using the plotting parameters given in *params
. The PostScript output is printed to the writable output stream *stream
using fprintf()
.
The algorithm is set up so that it requires only one pass through the list. After defining PostScript macros to plot mesh points, mesh tiles, and mismatch ellipses, the routine then defines a macro to plot the boundary. Since some PostScript interpreters will fail if a macro contains too many objects, the boundary-plotting macro may be split into several macros.
LALPlotTwoDMesh() then calls a static (but LAL-compliant) subroutine LALMakeMeshMacro() to create one or more macros to plot the mesh points, tiles, or ellipses, as required by *params
. This subroutine takes a pointer to the head of a list of mesh points as input, and traverses down the list, calling itself recursively on any submeshes it encounters (if params->maxLevels
permits).
While plotting the boundary and other mesh objects, LALPlotTwoDMesh() and LALMakeMeshMacro() keep track of the bounding box surrounding all plotted objects. This is used either to set a bounding box for the overall plot, or to adjust the scale of the plot, depending on params->autoscale
. If the resulting bounding box is larger than a single \( 8.5''\times11'' \) page, LALPlotTwoDMesh() will divide the plot area up into pages of this side, calling the plotting macros on each page.
Definition at line 97 of file TwoDMeshPlot.c.
#define TWODMESHPLOTH_ENUL 1 |
Definition at line 58 of file TwoDMeshPlot.h.
#define TWODMESHPLOTH_EOUT 2 |
Definition at line 59 of file TwoDMeshPlot.h.
#define TWODMESHPLOTH_EMEM 3 |
Definition at line 60 of file TwoDMeshPlot.h.
#define TWODMESHPLOTH_EMETRIC 4 |
Definition at line 61 of file TwoDMeshPlot.h.
#define TWODMESHPLOTH_ENOPLOT 5 |
Definition at line 62 of file TwoDMeshPlot.h.
#define TWODMESHPLOTH_MSGENUL "Unexpected null pointer in arguments" |
Definition at line 64 of file TwoDMeshPlot.h.
#define TWODMESHPLOTH_MSGEOUT "Output handle points to a non-null pointer" |
Definition at line 65 of file TwoDMeshPlot.h.
#define TWODMESHPLOTH_MSGEMEM "Memory allocation error" |
Definition at line 66 of file TwoDMeshPlot.h.
#define TWODMESHPLOTH_MSGEMETRIC "Non-positive metric" |
Definition at line 67 of file TwoDMeshPlot.h.
#define TWODMESHPLOTH_MSGENOPLOT "Nothing to plot" |
Definition at line 68 of file TwoDMeshPlot.h.
#define TWODMESHPLOTH_XSIZE 540 |
Horizontal size of plotting area (points = \( 1/72'' \) )
Definition at line 76 of file TwoDMeshPlot.h.
#define TWODMESHPLOTH_YSIZE 720 |
Vertical size of plotting area (points)
Definition at line 77 of file TwoDMeshPlot.h.
#define TWODMESHPLOTH_XMARG 36 |
Distance from left of page to plotting area (points)
Definition at line 78 of file TwoDMeshPlot.h.
#define TWODMESHPLOTH_YMARG 36 |
Distance from bottom of page to plotting area (points)
Definition at line 79 of file TwoDMeshPlot.h.