IBSimu 1.0.4
|
Class for colormap type plots. More...
#include <colormap.hpp>
Public Member Functions | |
Colormap () | |
Default constructor for empty colormap graph. | |
Colormap (const double datarange[4], size_t n, size_t m, const std::vector< double > &data) | |
Constructor for basic graph with defined data. | |
virtual | ~Colormap () |
Destructor. | |
void | set_interpolation (interpolation_e interpolation) |
Set interpolation mode. | |
void | set_zscale (zscale_e zscale) |
Set zscale mode. | |
virtual void | plot (cairo_t *cairo, const Coordmapper *cm, const double range[4]) |
Plot graph with cairo. | |
virtual void | get_bbox (double bbox[4]) |
Get bounding box of graph. | |
void | set_palette (const Palette &palette) |
Set colormap palette. | |
void | get_zrange (double &min, double &max) const |
Get zrange for colormap plot. | |
double | get_value (double x, double y) const |
Get value of interpolated colormap data. |
Class for colormap type plots.
Implementation of Graph.
Colormap::Colormap | ( | ) |
Default constructor for empty colormap graph.
Colormap::Colormap | ( | const double | datarange[4], |
size_t | n, | ||
size_t | m, | ||
const std::vector< double > & | data | ||
) |
Constructor for basic graph with defined data.
Data is defined as n by m array of data, where x and y ranges are defined in datarange in order xmin, ymin, xmax, ymax. Z-values are defined in vector data in y major order. Internal copy of the data from data is made.
virtual Colormap::~Colormap | ( | ) | [virtual] |
Destructor.
virtual void Colormap::get_bbox | ( | double | bbox[4] | ) | [virtual] |
Get bounding box of graph.
Returns the bounding box of the graph in array bbox in order xmin, ymin, xmax, ymax.
Implements Graph.
double Colormap::get_value | ( | double | x, |
double | y | ||
) | const |
Get value of interpolated colormap data.
void Colormap::get_zrange | ( | double & | min, |
double & | max | ||
) | const |
Get zrange for colormap plot.
virtual void Colormap::plot | ( | cairo_t * | cairo, |
const Coordmapper * | cm, | ||
const double | range[4] | ||
) | [virtual] |
Plot graph with cairo.
Plot the graph using cairo and coordinate mapper cm. The visible range of plot is given in array range in order xmin, ymin, xmax, ymax.
Implements Graph.
void Colormap::set_interpolation | ( | interpolation_e | interpolation | ) |
Set interpolation mode.
void Colormap::set_palette | ( | const Palette & | palette | ) |
Set colormap palette.
void Colormap::set_zscale | ( | zscale_e | zscale | ) |
Set zscale mode.