Data::Plot class reference
[Core module]

Declaration  

#include <Goptical/Data/Plot>

namespace Goptical {
namespace Data {
class Plot;
};
};

This class is a member of the Data namespace.

Inheritance  

Description  

This class is used to describe a data plot. It contains a list of PlotData objects and describes some plot properties (title, range, ...).

Plots can be built from data sets or obtained directly from various analysis functions. They can be rendered on a Io::RendererViewport object with the draw function.

Members  

See also the full member list section for this class.

Functions  

Members detail  

Plot()  

Create a new empty plot

PlotData & add_plot_data(const Set &data, const Io::Rgb &color = Io::rgb_red, const std::string &label = "data", PlotStyleMask style = InterpolatePlot|PointPlot)  

Create and add plot data from specified data set.

void add_plot_data(PlotData &data)  

Add plot data

void draw(Io::RendererViewport &r)  

draw

void erase_plot_data()  

Discard all plot data set

void fit_axes_range()  

Set axis position to dataset range

Io::RendererAxes & get_axes()  

Get plot axes object

const Io::RendererAxes & get_axes() const  

Get plot axes object

unsigned int get_dimensions() const  

Get data sets dimensions, return 0 if inconsistent

unsigned int get_plot_count() const  

Get plot data set count

PlotData & get_plot_data(unsigned int index)  

Get plot data set at given index

const PlotData & get_plot_data(unsigned int index) const  

Get plot data set at given index

const std::string & get_title() const  

Get plot main title

Math::range_t get_x_data_range(unsigned int dimension = 0) const  

Get range of x data in sets

bool get_xy_swap() const  

Get x and y axis swap state for 2d plots

Math::range_t get_y_data_range() const  

Get range of y data in sets

void set_color(const Io::Rgb &color)  

Set color for all plots

void set_different_colors()  

Automatically choose different colors for each plot

void set_style(PlotStyleMask style)  

Set plot style for all plot

void set_title(const std::string &title)  

Set plot main title

void set_xy_swap(bool doswap)  

Swap x and y axis for 2d plots

Valid XHTML 1.0 StrictGenerated by diaxen on Sun Jan 8 00:47:23 2012 using MkDoc