44 #define COLORMAP_HPP 1
88 std::vector<double> _f;
92 void make_data_interpolation(
void );
94 void plot_to_image_surface( cairo_surface_t *surface,
const Coordmapper *cm,
int plim[4] );
113 Colormap(
const double datarange[4],
size_t n,
size_t m,
114 const std::vector<double> &data );
129 void set_data(
const double datarange[4],
size_t n,
size_t m,
130 const std::vector<double> &data );
164 virtual void plot( cairo_t *cairo,
const Coordmapper *cm,
const double range[4] );
170 virtual void plot_sample( cairo_t *cairo,
double x,
double y,
double width,
double height );
177 virtual void get_bbox(
double bbox[4] );
189 void get_zrange(
double &min,
double &max )
const;
200 double get_value(
double x,
double y )
const;
void set_zrange(double min, double max)
Set zrange for colormap plot.
Base class for 2d interpolation.
Definition: interpolation.hpp:56
Abstract base class for drawable plots.
Definition: graph.hpp:56
Base for plottable graphs.
Palette & palette(void)
Get a reference to colormap palette.
Definition: colormap.hpp:185
void get_zrange(double &min, double &max) const
Get zrange for colormap plot.
1D and 2D coordinate transformations for plotter.
Definition: colormap.hpp:66
Class for palette definition.
Definition: palette.hpp:59
Definition: colormap.hpp:58
virtual ~Colormap()
Destructor.
virtual void get_bbox(double bbox[4])
Get bounding box of graph.
void set_zscale(zscale_e zscale)
Set zscale mode.
interpolation_e
Definition: colormap.hpp:56
Class for colormap type plots.
Definition: colormap.hpp:74
virtual void plot(cairo_t *cairo, const Coordmapper *cm, const double range[4])
Plot graph with cairo.
Linear-linear 2D coordinate mapper.
Definition: coordmapper.hpp:119
void set_data(const double datarange[4], size_t n, size_t m, const std::vector< double > &data)
Define colormap from data.
Definition: colormap.hpp:65
double get_value(double x, double y) const
Get value of interpolated colormap data.
zscale_e
Definition: colormap.hpp:63
Definition: colormap.hpp:57
void set_palette(const Palette &palette)
Set colormap palette.
virtual void plot_sample(cairo_t *cairo, double x, double y, double width, double height)
Plot sample for legend.
Colormap()
Default constructor for empty colormap graph.
Definition: colormap.hpp:59
void set_interpolation(interpolation_e interpolation)
Set interpolation mode.
Definition: colormap.hpp:64
Two dimensional interpolation.