a class for surface datasets
More...
#include <gtkmm-plplot/plotdatasurface.h>
|
std::vector< double > | x |
| The X-grid coordinates of the dataset, which are assumed to correspond to the first dimension of Z.
|
|
std::vector< double > | y |
| The Y-grid coordinates of the dataset, which are assumed to correspond to the second dimension of Z.
|
|
double ** | z |
| The Z-values of the dataset. This is an array of arrays whose first dimension must correspond to the length of x, while the second must correspond to the length of y.
|
|
sigc::signal< void(void)> | _signal_changed |
| signal that gets emitted whenever any of the dataset proprties is changed.
|
|
sigc::signal< void(void)> | _signal_data_modified |
| signal that gets emitted whenever the X- and Y-datasets have been modified.
|
|
a class for surface datasets
Instances of this class will hold a single (and the only possible) dataset for a surface plot types like PlotContour and PlotContourShades. The input data can be provided as std::vector (X and Y), std::valarray (X and Y), double** (Z, array of arrays) and boost:multi_array (Z). This datatype is demonstrated in Example 7: a Simple contour plot.
◆ PlotDataSurface() [1/5]
Gtk::PLplot::PlotDataSurface::PlotDataSurface |
( |
| ) |
|
|
privatedelete |
◆ PlotDataSurface() [2/5]
◆ PlotDataSurface() [3/5]
Gtk::PLplot::PlotDataSurface::PlotDataSurface |
( |
const std::vector< double > & |
x, |
|
|
const std::vector< double > & |
y, |
|
|
double ** |
z |
|
) |
| |
Constructor
Initializes a new dataset for a PlotContour.
- Parameters
-
x | the X-grid coordinates of the dataset, provided as a std::vector. Have to match the first dimension of z |
y | the Y-grid coordinates of the dataset, provided as a std::vector. Have to match the second dimension of z |
z | the actual surface data, provided as a dynamically allocated array of dynamically allocated arrays. The constructor will initialize its own deep-copy of this variable. |
- Exceptions
-
◆ PlotDataSurface() [4/5]
Gtk::PLplot::PlotDataSurface::PlotDataSurface |
( |
const std::valarray< double > & |
x, |
|
|
const std::valarray< double > & |
y, |
|
|
double ** |
z |
|
) |
| |
Constructor
Initializes a new dataset for a PlotContour.
- Parameters
-
x | the X-grid coordinates of the dataset, provided as a std::valarray. Have to match the first dimension of z |
y | the Y-grid coordinates of the dataset, provided as a std::valarray. Have to match the second dimension of z |
z | the actual surface data, provided as a dynamically allocated array of dynamically allocated arrays. The constructor will initialize its own deep-copy of this variable. |
◆ PlotDataSurface() [5/5]
Gtk::PLplot::PlotDataSurface::PlotDataSurface |
( |
unsigned int |
nx, |
|
|
unsigned int |
ny, |
|
|
double ** |
z |
|
) |
| |
Constructor
Initializes a new dataset for a PlotContour. The X- and Y-values will be set to a vector of the appropriate size with elements set to correspond to their array subscript.
- Parameters
-
nx | the extent of z along the first dimension |
ny | the extent of z along the second dimension |
z | the actual surface data, provided as a dynamically allocated array of dynamically allocated arrays. The constructor will initialize its own deep-copy of this variable. |
◆ ~PlotDataSurface()
virtual Gtk::PLplot::PlotDataSurface::~PlotDataSurface |
( |
| ) |
|
|
virtual |
◆ get_array2d_z()
double ** Gtk::PLplot::PlotDataSurface::get_array2d_z |
( |
| ) |
|
Free the memory with free_array2d().
- Returns
- a copy of the dataset Z-values
◆ get_vector_x()
std::vector< double > Gtk::PLplot::PlotDataSurface::get_vector_x |
( |
| ) |
|
- Returns
- a copy of the dataset X-values
◆ get_vector_y()
std::vector< double > Gtk::PLplot::PlotDataSurface::get_vector_y |
( |
| ) |
|
- Returns
- a copy of the dataset Y-values
◆ operator=()
std::vector<double> Gtk::PLplot::PlotDataSurface::x |
|
protected |
The X-grid coordinates of the dataset, which are assumed to correspond to the first dimension of Z.
std::vector<double> Gtk::PLplot::PlotDataSurface::y |
|
protected |
The Y-grid coordinates of the dataset, which are assumed to correspond to the second dimension of Z.
double** Gtk::PLplot::PlotDataSurface::z |
|
protected |
The Z-values of the dataset. This is an array of arrays whose first dimension must correspond to the length of x, while the second must correspond to the length of y.