PlotOptions.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2008 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/More/Plotting/Pulsar/PlotOptions.h
10
11#ifndef __Pulsar_PlotOptions_h
12#define __Pulsar_PlotOptions_h
13
14#include "Pulsar/Application.h"
15
16namespace Pulsar {
17
18 class Interpreter;
19
22 {
23 public:
24
26 PlotOptions (bool open_device = true);
27
29 void set_open_device (bool flag);
30
32 void set_device (const std::string& dev) { plot_device = dev; }
33
35 void set_pixels (const std::string&);
36
38 void set_panels (const std::string&);
39
41 unsigned get_x_npanel () const { return x_npanel; }
42 void set_x_npanel (unsigned n) { x_npanel = n; }
43
44 unsigned get_y_npanel () const { return y_npanel; }
45 void set_y_npanel (unsigned n) { y_npanel = n; }
46
48 void setup ();
49
51 void finalize ();
52
53 private:
54
56 virtual void add_options (CommandLine::Menu&);
57
58 std::string plot_device;
59
60 // number of panel into which plot surface will be divided
61 unsigned x_npanel, y_npanel;
62
63 // width of plot surface in cm
64 float surface_width;
65
66 // aspect ratio (height/width)
67 float aspect_ratio;
68
69 // plot dimensions in pixels
70 unsigned width_pixels, height_pixels;
71
72 // open device
73 bool open_device;
74 };
75
76}
77
78#endif
Describes application command line options.
Definition Application.h:159
Pulsar data processing command language interpreter.
Definition Interpreter.h:52
void set_open_device(bool flag)
Enable/disable pgplot device open and close.
Definition PlotOptions.C:37
void setup()
Open the plot device and configure it.
Definition PlotOptions.C:84
void set_device(const std::string &dev)
Set the plot device.
Definition PlotOptions.h:32
void set_panels(const std::string &)
Set the number of panels into which the plot surface is divided.
Definition PlotOptions.C:75
unsigned get_x_npanel() const
Get the number of panels into which the plot surface is divided.
Definition PlotOptions.h:41
PlotOptions(bool open_device=true)
Default constructor.
Definition PlotOptions.C:18
void set_pixels(const std::string &)
Set the plot dimensions in pixels.
Definition PlotOptions.C:66
void finalize()
Close the plot device.
Definition PlotOptions.C:116
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0