MultiPlot.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2006 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/More/Plotting/Pulsar/MultiPlot.h
10
11#ifndef __Pulsar_MultiPlot_h
12#define __Pulsar_MultiPlot_h
13
14#include "Pulsar/Plot.h"
15#include "Pulsar/MultiFrame.h"
16
17namespace Pulsar {
18
19 class FramedPlot;
20
22 class MultiPlot : public Plot {
23
24 public:
25
27 MultiPlot ();
28
30 static MultiPlot* factory (Plot*);
31
34
36 PlotAttributes* get_attributes ();
37
39 void plot (const Archive*);
40
42
44 void manage (Plot*);
45
47 void manage (const std::string& name, FramedPlot*);
48
50 void unmanage (FramedPlot*);
51
53 virtual void prepare (const Archive*);
54
56 virtual void prepare (FramedPlot*) { }
57
59 virtual MultiFrame* get_frame () { return &frames; }
60
62 virtual const MultiFrame* get_frame () const { return &frames; }
63
64 protected:
65
68
70 std::map< std::string, Reference::To<FramedPlot> > plots;
71
72 void set_viewport (PlotFrame* frame,
73 std::pair<float,float>& sub_xvp,
74 std::pair<float,float>& sub_yvp);
75
76 };
77
78}
79
80#endif
MultiPlot()
Default constructor.
Definition MultiPlot.C:17
The primary interface to pulsar observational data.
Definition Archive.h:46
A Plot with a PlotFrame.
Definition FramedPlot.h:20
Manages multiple plot frames.
Definition MultiFrame.h:20
virtual void prepare(const Archive *)
Derived classes may wish to prepare before plotting.
Definition MultiPlot.C:31
void unmanage(FramedPlot *)
Stop managing a plot.
Definition MultiPlot.C:207
TextInterface::Parser * get_frame_interface()
Get the text interface to the frame attributes.
Definition MultiPlot.C:21
virtual const MultiFrame * get_frame() const
Get the frame.
Definition MultiPlot.h:62
virtual void prepare(FramedPlot *)
Derived classes may wish to prepare before each plot is used.
Definition MultiPlot.h:56
std::map< std::string, Reference::To< FramedPlot > > plots
The plots.
Definition MultiPlot.h:70
MultiFrame frames
The plot frames.
Definition MultiPlot.h:67
static MultiPlot * factory(Plot *)
Factory returns appropriate derived class.
Definition MultiPlot.C:222
PlotAttributes * get_attributes()
Get the plot attributes.
Definition MultiPlot.C:26
MultiPlot()
Default constructor.
Definition MultiPlot.C:17
void manage(Plot *)
Auto-manage a plot.
Definition MultiPlot.C:130
void plot(const Archive *)
Plot in the current viewport.
Definition MultiPlot.C:43
virtual MultiFrame * get_frame()
Get the frame.
Definition MultiPlot.h:59
Stores the properties of the plot frame.
Definition PlotFrame.h:26
Plot()
Default constructor.
Definition Plot.C:14
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0