# PlotMM::Plot Class Reference

Collaboration diagram for PlotMM::Plot:
[legend]
List of all members.

## Detailed Description

Class implementing a plot widget.

## Public Member Functions

int | add_curve (const Glib::RefPtr< Curve > &, PlotAxisID xaxis=AXIS_BOTTOM, PlotAxisID yaxis=AXIS_LEFT, bool enable=true)
void | replot ()
PlotLabel * | title ()
Scale * | scale (PlotAxisID id)
PlotLabel * | label (PlotAxisID id)
SigC::Signal3< void, int, int, GdkEventButton * > | signal_plot_mouse_press ()
SigC::Signal3< void, int, int, GdkEventButton * > | signal_plot_mouse_release ()
SigC::Signal3< void, int, int, GdkEventMotion * > | signal_plot_mouse_move ()
void | set_selection (const Rectangle &r)
Rectangle | get_selection ()
void | enable_selection ()
void | disable_selection ()

## Protected Member Functions

virtual bool | on_canvas_expose_event (GdkEventExpose *event)
virtual void | draw_selection_ ()

## Protected Attributes

Gtk::Table | layout_
PlotCanvas | canvas_
std::vector< Scale * > | tickMark_
std::vector< ScaleLabels * > | tickLabel_
std::vector< PlotLabel * > | axisLabel_
PlotLabel | title_

## Classes

struct | CurveInfo

## Member Function Documentation

int Plot::add_curve | ( | const Glib::RefPtr< Curve > & | cv,
|  | PlotAxisID | xaxis = `AXIS_BOTTOM`,
|  | PlotAxisID | yaxis = `AXIS_LEFT`,
|  | bool | enable = `true`
| ) |

| Add a new curve to the plot. The plot will not be updated - call replot() manually after adding new curves.

void Plot::disable_selection | ( |  | ) |

| Disable drawing of the selection rectangle. To actually erase the rectangle, replot() must be called.

void Plot::draw_selection_ | ( |  | ) | `[protected, virtual]`

| draws the current selection rectangle on the plot canvas.

void Plot::enable_selection | ( |  | ) |

| Enable drawing of the selection rectangle. The geometry can be changed using set_selection. To actually draw the rectangle, replot() must be called.

void Plot::replot | ( |  | ) |

| Replot all curves After adding curves to the plot or changing the curves' data with Curve::setData() this method must be called to update the plot. If autoscaling is activated for an axis used by any of the Curve::enabled() curves that axis will be scaled to a new range.

void Plot::set_selection | ( | const Rectangle & | r | ) |

| Set the selection to the given rectangle. If selection is enabled, the old rectangle is erased and the new is drawn. Note that replot() does not have to be called explicitly. No other canvas contents but the rectangle are redrawn calling this method.

SigC::Signal3< void, int, int, GdkEventMotion * > Plot::signal_plot_mouse_move | ( |  | ) |

| Return the signal owned by plot canvas.

SigC::Signal3< void, int, int, GdkEventButton * > Plot::signal_plot_mouse_press | ( |  | ) |

| Return the signal owned by plot canvas.

SigC::Signal3< void, int, int, GdkEventButton * > Plot::signal_plot_mouse_release | ( |  | ) |

| Return the signal owned by plot canvas.