ProfileVectorPlotter.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2006 - 2013 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/More/Plotting/Pulsar/ProfileVectorPlotter.h
10 
11 #ifndef __Pulsar_ProfileVectorPlotter_h
12 #define __Pulsar_ProfileVectorPlotter_h
13 
14 #include "Pulsar/PlotPen.h"
15 
16 namespace Pulsar {
17 
18  class Profile;
19  class PlotFrame;
20 
22  class ProfileVectorPlotter : public Reference::Able {
23 
24  public:
25 
28 
30  void minmax (PlotFrame* frame) const;
31 
33  void set_pen (PlotPen* p) { pen = p; }
34 
36  void draw ( float sx, float ex );
37 
39  void draw (const Profile*, float sx, float ex );
40 
42  std::vector< Reference::To<const Profile> > profiles;
43 
45  std::vector<float> ordinates;
46 
48  std::vector< int > plot_sci;
49 
51  std::vector< int > plot_sls;
52 
54  std::vector< int > plot_slw;
55 
57  bool plot_histogram;
58 
60  bool transpose;
61 
62  private:
63 
66 
67  void setup_pen (unsigned);
68  };
69 
70 }
71 
72 #endif
void minmax(PlotFrame *frame) const
set the y_scale min and max based on the x_scale min and max
Definition: ProfileVectorPlotter.C:23
bool plot_histogram
Plot histogram style.
Definition: ProfileVectorPlotter.h:62
const float * get_amps() const
Return a pointer to the amplitudes array.
Definition: ProfileAmps.C:141
PlotScale * get_y_scale(bool allow_transpose)
Get the x-scale.
Definition: PlotFrame.C:213
Any quantity recorded as a function of pulse phase.
Definition: Profile.h:45
bool transpose
Transpose the x and y axes.
Definition: ProfileVectorPlotter.h:65
std::vector< int > plot_slw
the PGPLOT line width for each profile
Definition: ProfileVectorPlotter.h:59
void draw(float sx, float ex)
draw all profiles
Definition: ProfileVectorPlotter.C:48
unsigned get_nbin() const
Return the number of bins.
Definition: ProfileAmps.h:50
std::vector< int > plot_sci
the PGPLOT colour for each profile
Definition: ProfileVectorPlotter.h:53
Stores and sets plot line attributes.
Definition: PlotPen.h:24
std::vector< Reference::To< const Profile > > profiles
the vector of profiles to be drawn
Definition: ProfileVectorPlotter.h:47
PlotScale * get_x_scale(bool allow_transpose)
Get the x-scale.
Definition: PlotFrame.C:189
void get_indeces(unsigned n, unsigned &imin, unsigned &imax, bool cyclic=false) const
Return array indeces that span the axis indeces.
Definition: PlotScale.C:197
void set_pen(PlotPen *p)
set the PlotPen used to draw all profiles
Definition: ProfileVectorPlotter.h:38
std::vector< float > ordinates
the shared ordinates
Definition: ProfileVectorPlotter.h:50
Defines the PSRCHIVE library.
Definition: CalSource.h:17
void set_minmax(float min, float max)
Set the minimum and maximum value in the data.
Definition: PlotScale.C:57
ProfileVectorPlotter()
Default constructor.
Definition: ProfileVectorPlotter.C:17
std::vector< int > plot_sls
the PGPLOT line style for each profile
Definition: ProfileVectorPlotter.h:56
Stores the properties of the plot frame.
Definition: PlotFrame.h:31

Generated using doxygen 1.8.17