Pulsar::PlotScale Class Reference

The scale on an axis. More...

#include <PlotScale.h>

Inheritance diagram for Pulsar::PlotScale:
Pulsar::PlotEdge Reference::Able Reference::HeapTracked Pulsar::FrequencyScale Pulsar::MoreScale Pulsar::PhaseScale Pulsar::TimeScale

Public Member Functions

 PlotScale ()
 Default constructor.
virtual TextInterface::Parserget_interface ()
virtual void init (const Archive *)
 Initialize internal attributes according to Archive data.
void copy (PlotScale *other)
 Copy another PlotScale.
void include (PlotScale *other)
 Expand as necessary to include another PlotScale.
virtual std::string get_label () const
 Get a description of the units.
void set_minmax (float min, float max)
 Set the minimum and maximum value in the data.
bool get_minmaxset () const
 Return true when minimum and maximum value have been set.
void get_minmax (float &min, float &max) const
 Get the minimum and maximum value in the data.
void update_minmax (float min, float max)
 Update the minimum and maximum value in the data.
std::pair< float, float > get_minmax () const
 Get the world coordinate range printed on the axis.
void get_range (float &min, float &max) const
 Return min and max scaled according to zoom.
void get_indeces (unsigned n, unsigned &imin, unsigned &imax, bool cyclic=false) const
 Return array indeces that span the axis indeces.
void get_axis_indeces (unsigned n, float &imin, float &imax, bool cyclic=false) const
 Return axis indeces scaled according to zoom.
void get_range_external (float &min, float &max) const
 Return min and max scaled according to zoom.
void set_range_norm (const std::pair< float, float > &f)
 Set the world-normalized range on the axis.
std::pair< float, float > get_range_norm () const
 Get the world-normalized range on the axis.
void set_range_norm (float min, float max)
 Convenience interface.
void set_buf_norm (float f)
 Set the world-normalized buffer space on either side of the axis.
float get_buf_norm () const
 Get the world-normalized buffer space on either side of the axis.
void set_world (const std::pair< float, float > &f)
 Set the world coordinate range in the viewport.
std::pair< float, float > get_world () const
 Get the world coordinate range in the viewport.
void set_world_external (const std::pair< float, float > &f)
 Set the world coordinate range printed on the axis.
std::pair< float, float > get_world_external () const
 Get the world coordinate range printed on the axis.
void set_index_range (const std::pair< unsigned, unsigned > &index)
 Set the index range to be plotted.
std::pair< unsigned, unsigned > get_index_range () const
 Get the index range to be plotted.
unsigned get_num_indeces () const
std::pair< float, float > viewport_to_world (const std::pair< float, float > &)
double viewport_to_world (const double)
virtual void freeze (bool f=true)
 Freeze the frame.
Public Member Functions inherited from Pulsar::PlotEdge
void set_viewport (const std::pair< float, float > &f)
 Set the viewport (normalized device coordinates)
std::pair< float, float > get_viewport () const
 Get the viewport (normalized device coordinates)
Public Member Functions inherited from Reference::Able
 Able (const Able &)
Ableoperator= (const Able &)
unsigned get_reference_count () const
Public Member Functions inherited from Reference::HeapTracked
 HeapTracked (const HeapTracked &)
HeapTrackedoperator= (const HeapTracked &)
bool __is_on_heap () const

Protected Attributes

std::pair< float, float > world
std::pair< float, float > range_norm
std::pair< float, float > world_external
std::pair< unsigned, unsigned > index_range
unsigned num_indeces = 0
float buf_norm = 0.0
float minval = 0.0
float maxval = 1.0
bool minmaxvalset = false
bool frozen = false
Protected Attributes inherited from Pulsar::PlotEdge
std::pair< float, float > viewport

Additional Inherited Members

Static Public Member Functions inherited from Reference::Able
static size_t get_instance_count ()
Static Public Member Functions inherited from Reference::HeapTracked
static void * operator new (size_t size, void *ptr=0)
static void operator delete (void *location, void *ptr)
static void operator delete (void *location)
static size_t get_heap_queue_size ()
Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
void __dereference (bool auto_delete=true) const

Detailed Description

The scale on an axis.

Member Function Documentation

◆ get_label()

virtual std::string Pulsar::PlotScale::get_label ( ) const
inlinevirtual

Get a description of the units.

Reimplemented in Pulsar::FrequencyScale, Pulsar::MoreScale, Pulsar::PhaseScale, and Pulsar::TimeScale.

◆ get_range_external()

void Pulsar::PlotScale::get_range_external ( float & min,
float & max ) const

Return min and max scaled according to zoom.

Return min and max scaled according to zoom attributes.

References get_range().

Referenced by Pulsar::DigitiserCountsPlot::draw().

◆ init()

void Pulsar::PlotScale::init ( const Archive * )
virtual

Initialize internal attributes according to Archive data.

Reimplemented in Pulsar::FrequencyScale, Pulsar::MoreScale, Pulsar::PhaseScale, and Pulsar::TimeScale.


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

Generated using doxygen 1.14.0