Class for drawing fields with colormap. More...
#include <fieldgraph.hpp>

Public Member Functions | |
FieldGraph (const Geometry &geom, const Field *field, field_type_e field_type) | |
Constructor for plotting field. More... | |
virtual | ~FieldGraph () |
Destructor. More... | |
field_type_e | field_type (void) const |
Get field type. More... | |
void | enable (bool enable) |
Set field to be plotted. More... | |
void | set_zrange (double zmin, double zmax) |
Set zrange for plot. More... | |
void | build_plot (void) |
Build plot. More... | |
virtual void | plot (cairo_t *cairo, const Coordmapper *cm, const double range[4]) |
Plot graph with cairo. More... | |
virtual void | plot_sample (cairo_t *cairo, double x, double y, double width, double height) |
Plot sample for legend. More... | |
virtual void | get_bbox (double bbox[4]) |
Get bounding box of drawable. More... | |
![]() | |
Graph3D (const Mesh &mesh) | |
Constructor. More... | |
virtual | ~Graph3D () |
Virtual destructor. More... | |
void | set_view (view_e view, int level) |
Set the view of 3D drawable. More... | |
![]() | |
virtual | ~Graph () |
Virtual destructor. More... | |
![]() | |
MeshColormap () | |
Default constructor for empty colormap graph. More... | |
MeshColormap (const MeshColormap &colormap) | |
Copy constructor. More... | |
MeshColormap (const double datarange[4], size_t n, size_t m, const std::vector< double > &data) | |
Constructor for colormap from data. More... | |
virtual | ~MeshColormap () |
Destructor. More... | |
void | clear_data (void) |
Clears colormap data. More... | |
void | set_data (const double datarange[4], size_t n, size_t m, const std::vector< double > &data) |
Define colormap from data. More... | |
bool | has_data (void) const |
Does colormap have data? More... | |
interpolation_e | get_interpolation (void) const |
Set interpolation mode. More... | |
void | set_interpolation (interpolation_e interpolation) |
Set interpolation mode. More... | |
virtual double | zscale (double val) |
Scale value val according to zscale mode. More... | |
virtual double | zscale_inv (double val) |
Inverse scale value val according to zscale mode. More... | |
zscale_e | get_zscale (void) const |
Get zscale mode. More... | |
void | set_zscale (zscale_e zscale) |
Set zscale mode. More... | |
void | set_palette (const Palette &palette) |
Set colormap palette. More... | |
virtual Palette & | palette (void) |
Get a reference to colormap palette. More... | |
const Palette & | palette (void) const |
Get a reference to colormap palette. More... | |
void | get_zrange (double &min, double &max) const |
Get zrange for colormap plot. More... | |
void | set_zrange (double min, double max) |
Set zrange for colormap plot. More... | |
double | get_value (double x, double y) const |
Get value of interpolated colormap data. More... | |
![]() | |
virtual | ~Colormap () |
Destructor. More... | |
Additional Inherited Members | |
![]() | |
const Mesh & | _mesh |
Mesh of simulation. More... | |
view_e | _view |
Geometry view direction. More... | |
int | _vb [3] |
Coordinate index for first, second and third axes. More... | |
int | _level |
Level of slice in mesh units. More... | |
double | _level_si |
Level in meters. More... | |
Detailed Description
Class for drawing fields with colormap.
Implementation of Graph3D. Used in Frame type plots.
Constructor & Destructor Documentation
◆ FieldGraph()
FieldGraph::FieldGraph | ( | const Geometry & | geom, |
const Field * | field, | ||
field_type_e | field_type | ||
) |
Constructor for plotting field.
◆ ~FieldGraph()
|
virtual |
Destructor.
Member Function Documentation
◆ build_plot()
void FieldGraph::build_plot | ( | void | ) |
Build plot.
Reads in field data and produces the colormap for the plot. Automatically called by plot(), but can be called to produce automatic zranges.
◆ enable()
void FieldGraph::enable | ( | bool | enable | ) |
Set field to be plotted.
The field_type can be FIELD_NONE and field NULL for no plotting.
Set field to be plotted.
The field_type can be FIELD_NONE and field NULL for no plotting.
Enable/disable plot.
◆ field_type()
field_type_e FieldGraph::field_type | ( | void | ) | const |
Get field type.
◆ get_bbox()
|
virtual |
Get bounding box of drawable.
Returns the bounding box of the drawable in array bbox in order xmin, ymin, xmax, ymax.
Implements Graph3D.
◆ plot()
|
virtual |
◆ plot_sample()
|
virtual |
◆ set_zrange()
void FieldGraph::set_zrange | ( | double | zmin, |
double | zmax | ||
) |
Set zrange for plot.
The zrange defaults to automatically scaled range for the whole field for scalarfields and automatically scaled range for the view plane only for vectorfields.
The documentation for this class was generated from the following files: