|
| PlotData3D (const std::vector< double > &x, const std::vector< double > &y, const std::vector< double > &z, Gdk::RGBA color=Gdk::RGBA("red"), LineStyle line_style=CONTINUOUS, double line_width=PLOTDATA_DEFAULT_LINE_WIDTH) |
|
| PlotData3D (const std::valarray< double > &x, const std::valarray< double > &y, const std::valarray< double > &z, Gdk::RGBA color=Gdk::RGBA("red"), LineStyle line_style=CONTINUOUS, double line_width=PLOTDATA_DEFAULT_LINE_WIDTH) |
|
virtual | ~PlotData3D () |
|
std::vector< double > | get_vector_z () |
|
virtual void | add_datapoint (double xval, double yval, double zval) |
|
virtual void | add_datapoint (std::tuple< double, double, double > xyz_tuple) |
|
virtual void | remove_datapoint (size_t index) override |
|
virtual void | replace_datapoints (const std::vector< double > &x, const std::vector< double > &y, const std::vector< double > &z) |
|
virtual void | replace_datapoints (const std::valarray< double > &x, const std::valarray< double > &y, const std::valarray< double > &z) |
|
virtual void | draw_plot_data (const Cairo::RefPtr< Cairo::Context > &cr, plstream *pls) override |
|
| PlotData2D (const std::vector< double > &x, const std::vector< double > &y, Gdk::RGBA color=Gdk::RGBA("red"), LineStyle line_style=CONTINUOUS, double line_width=PLOTDATA_DEFAULT_LINE_WIDTH) |
|
| PlotData2D (const std::valarray< double > &x, const std::valarray< double > &y, Gdk::RGBA color=Gdk::RGBA("red"), LineStyle line_style=CONTINUOUS, double line_width=PLOTDATA_DEFAULT_LINE_WIDTH) |
|
| PlotData2D (const std::vector< double > &y, Gdk::RGBA color=Gdk::RGBA("red"), LineStyle line_style=CONTINUOUS, double line_width=PLOTDATA_DEFAULT_LINE_WIDTH) |
|
| PlotData2D (const std::valarray< double > &y, Gdk::RGBA color=Gdk::RGBA("red"), LineStyle line_style=CONTINUOUS, double line_width=PLOTDATA_DEFAULT_LINE_WIDTH) |
|
virtual | ~PlotData2D () |
|
std::vector< double > | get_vector_x () |
|
std::vector< double > | get_vector_y () |
|
size_t | size () |
|
virtual void | get_extremes (double &xmin, double &xmax, double &ymin, double &ymax) |
|
void | set_symbol (Glib::ustring symbol) |
|
Glib::ustring | get_symbol () |
|
void | set_symbol_color (Gdk::RGBA color) |
|
Gdk::RGBA | get_symbol_color () |
|
void | set_symbol_height_scale_factor (double scale_factor=1.0) |
|
double | get_symbol_height_scale_factor () |
|
virtual | ~PlotDataLine () |
|
void | set_color (Gdk::RGBA color) |
|
Gdk::RGBA | get_color () |
|
void | set_line_style (LineStyle line_style) |
|
LineStyle | get_line_style () |
|
void | set_line_width (double line_width) |
|
double | get_line_width () |
|
virtual | ~PlotData () |
|
void | set_name (Glib::ustring name) |
|
Glib::ustring | get_name () |
|
void | show () |
|
void | hide () |
|
bool | is_showing () const |
|
sigc::signal< void(void)> | signal_changed () |
|
sigc::signal< void(void)> | signal_data_modified () |
|
virtual void | set_manage () |
|
|
std::vector< double > | z |
| The Z-values of the dataset.
|
|
std::vector< double > | x |
| The X-values of the dataset.
|
|
std::vector< double > | y |
| The Y-values of the dataset.
|
|
Glib::ustring | symbol |
| If not an empty string, the symbol will be plotted at each of the data points from x and y .
|
|
Gdk::RGBA | symbol_color |
| The color the symbol will be plotted in.
|
|
double | symbol_scale_factor |
| Scale factor that will determine the size of the symbols. Default is 1.
|
|
Gdk::RGBA | color |
| The color the dataset will be drawn in.
|
|
LineStyle | line_style |
| The linestyle that will be used for this dataset in the plot.
|
|
double | line_width |
| The line width of the dataset. Default is 1.0.
|
|
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 that will hold a single dataset and its properties for a Plot3D plot
Instances of this class contain a single dataset for a Plot3D three-dimensional plot, consisting of the raw X-, Y- and Z-data, along with a number of properties that will determine the appearance of the plot. Data may be represented as a line, symbols or both. The constructors of this class allow to use either std::vector or std::valarray as sources of data, for added flexibility. Internally they are stored only as std::vector though. Important is that whenever a property is changed, signal_changed()
is emitted, which will eventually be picked up by the canvas
that will hold the plot. Several of the methods that are offered by this class are demonstrated in Example 9: a Three-dimensional plot.
virtual void Gtk::PLplot::PlotData3D::add_datapoint |
( |
double |
xval, |
|
|
double |
yval |
|
) |
| |
|
finalprivatevirtual |
Add a single datapoint, consisting of an xval
and yval
value, to the dataset
This datapoint will be added at the end of the std::vector's x
and y
. After this method is called, the plot will be automatically updated to reflect the changes. Do not use this method for PlotData3D objects, an exception will be thrown!
- Parameters
-
xval | an X-value |
yval | an Y-value |
- Exceptions
-
Reimplemented from Gtk::PLplot::PlotData2D.
virtual void Gtk::PLplot::PlotData3D::add_datapoint |
( |
double |
xval, |
|
|
double |
yval, |
|
|
double |
zval |
|
) |
| |
|
virtual |
Add a single datapoint, consisting of an xval
, yval
and zval
value, to the dataset
This datapoint will be added at the end of the std::vector's x
, y
and z
. After this method is called, the plot will be automatically updated to reflect the changes.
- Parameters
-
xval | an X-value |
yval | an Y-value |
zval | an Z-value |
virtual void Gtk::PLplot::PlotData3D::add_datapoint |
( |
std::pair< double, double > |
xy_pair | ) |
|
|
finalprivatevirtual |
Add a single datapoint, consisting of a std::pair with an X and Y value, to the dataset
This datapoint will be added at the end of the std::vector's x
and y
. After this method is called, the plot will be automatically updated to reflect the changes. Do not use this method for PlotData3D objects, an exception will be thrown!
- Parameters
-
xy_pair | a std::pair containing both an X- and a Y- value |
- Exceptions
-
Reimplemented from Gtk::PLplot::PlotData2D.
virtual void Gtk::PLplot::PlotData3D::add_datapoint |
( |
std::tuple< double, double, double > |
xyz_tuple | ) |
|
|
virtual |
Add a single datapoint, consisting of a std::tuple with an X, Y and Z value, to the dataset
This datapoint will be added at the end of the std::vector's x
, y
and z
. After this method is called, the plot will be automatically updated to reflect the changes.
- Parameters
-
xyz_tuple | a std::tuple containing 3 elements (X, Y and Z). |