Class for drawing fields with colormap. More...
#include <fieldgraph.hpp>
Public Member Functions | |
| FieldGraph (const ScalarField *field) | |
| Constructor for plotting ScalarField. More... | |
| FieldGraph (const Geometry *geom, const VectorField *field, field_type_e field_type) | |
| Constructor for plotting a VectorField field in geometry geom. More... | |
| virtual | ~FieldGraph () |
| Destructor. More... | |
| void | enable (bool enable) |
| Enable/disable plot. More... | |
| void | set_stepped_palette (int steps) |
| Set logarithmic scale. 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... | |
Public Member Functions inherited from Graph3D | |
| Graph3D () | |
| Constructor. More... | |
| virtual | ~Graph3D () |
| Virtual destructor. More... | |
| void | set_view (view_e view, int level) |
| Set the view of 3D drawable. More... | |
Public Member Functions inherited from Graph | |
| virtual | ~Graph () |
| Virtual destructor. More... | |
Public Member Functions inherited from Colormap | |
| Colormap () | |
| Default constructor for empty colormap graph. More... | |
| Colormap (const Colormap &colormap) | |
| Copy constructor. More... | |
| Colormap (const double datarange[4], size_t n, size_t m, const std::vector< double > &data) | |
| Constructor for colormap from data. More... | |
| virtual | ~Colormap () |
| Destructor. More... | |
| void | set_data (const double datarange[4], size_t n, size_t m, const std::vector< double > &data) |
| Define colormap from data. More... | |
| void | set_interpolation (interpolation_e interpolation) |
| Set interpolation mode. More... | |
| void | set_zscale (zscale_e zscale) |
| Set zscale mode. More... | |
| void | set_palette (const Palette &palette) |
| Set colormap palette. More... | |
| Palette & | palette (void) |
| 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... | |
Additional Inherited Members | |
Protected Attributes inherited from Graph3D | |
| 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... | |
Class for drawing fields with colormap.
Implementation of Graph3D. Used in Frame type plots.
| FieldGraph::FieldGraph | ( | const ScalarField * | field | ) |
Constructor for plotting ScalarField.
| FieldGraph::FieldGraph | ( | const Geometry * | geom, |
| const VectorField * | field, | ||
| field_type_e | field_type | ||
| ) |
Constructor for plotting a VectorField field in geometry geom.
|
virtual |
Destructor.
| void FieldGraph::enable | ( | bool | enable | ) |
Enable/disable plot.
|
virtual |
Get bounding box of drawable.
Returns the bounding box of the drawable in array bbox in order xmin, ymin, xmax, ymax.
Reimplemented from Colormap.
|
virtual |
|
virtual |
Plot sample for legend.
Plot graph sample for legend at cairo coordinates x.
Reimplemented from Colormap.
| void FieldGraph::set_stepped_palette | ( | int | steps | ) |
Set logarithmic scale.
Set stepped palette.
If steps is less than or equal to 1 a regular interpolated palette will be used, otherwise steps is used as the number of separate shades in the palette.