#include <CPyPlot.hpp>
Public Member Functions | |
CPyScatterPlot (string xname="x", string yname="y", int type=0, QWidget *myparent=0) | |
void | calculate (Matrix< float > *thedata=0) |
bool | do_plotting () |
double | getLimMin () const |
double | getLimMax () const |
string | getLimitName () const |
int | getNumPoints () const |
void | setLimitName (string name) |
void | setLimitRange (double low, double high) |
PyObject * | getXDataPtr () const |
PyObject * | getYDataPtr () const |
Private Attributes | |
int | type_ |
int | numPoints_ |
int | pointSize_ |
string | limName_ |
double | limMin_ |
double | limMax_ |
Matrix< float > * | data_ |
PyObject * | pyXData_ |
PyObject * | pyYData_ |
extension of the CPyPlot class for scatter plots (using python matplotlib)
CPyScatterPlot::CPyScatterPlot | ( | string | xname = "x" , |
|
string | yname = "y" , |
|||
int | type = 0 , |
|||
QWidget * | myparent = 0 | |||
) |
Constructor for a Python scatter plot
void CPyScatterPlot::calculate | ( | Matrix< float > * | thedata = 0 |
) | [virtual] |
C(++): store data by row. So thedata should contain 2 rows, one with x data and one with the corresponding y data
when passing a pointer to the plot the plot takes command of that pointer i.e. when the plot is destroyed it calls a delete on that pointer. If you want to keep your data you should pass a copy into calculate instead of the "real" data.
thedata is 0 by default. If you don't pass any data the calculate calls make_scatter_plot to generate the data, based on this's properties (e.g. x- and y name, type)
Reimplemented from CPyPlot.
bool CPyScatterPlot::do_plotting | ( | ) | [virtual] |
prepare everything for the plotting
Reimplemented from CPyPlot.
string CPyScatterPlot::limName_ [private] |
if we want the plotted particles to have a quantity in a certain range: this is the quantity name (from the vals_map map)
int CPyScatterPlot::pointSize_ [private] |
size of the symbols used for the scatter plot
int CPyScatterPlot::type_ [private] |
type of the particles on the plot
Reimplemented from CPyPlot.