Plot2DWindow Class Reference
a basic plot widget.
More...
#include <Plot2D.h>
List of all members.
|
Public Member Functions |
| | Plot2DWindow (wxWindow *parent, int id=-1, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0) |
| | ~Plot2DWindow () |
| void | SetPoints (std::vector< hugin_utils::FDiff2D > &) |
| | set the curve points manually
|
| template<class Functor> |
| void | Plot (Functor &f, double startx, double endx, int nPoints=100) |
| | plot a function
|
| void | SetAxis (double xstart, double xend, double ystart, double yend) |
| | set axis limits manually
|
| void | AutoSizeAxis () |
| | calculate the axis limits based on the current curve
|
| void | SetXSpacing (double x) |
| | set the spacing factor between the x and y labels
|
| void | SetYSpacing (double y) |
| void | SetAxisDivLen (int x) |
| | size of tick marks on the axis
|
| void | SetBorder (int x, int y) |
| | width/height of border around the plot space
|
| void | AxisEqual (bool b) |
| | equal scaling factor on x and y axis
|
| void | SetAutosize (bool a) |
| | controls if the axis limits should be updated after each plot command
|
Protected Member Functions |
| wxPoint | ToScreen (const hugin_utils::FDiff2D &p, const hugin_utils::FDiff2D &scale) const |
| void | OnPaint (wxPaintEvent &event) |
| void | Paint (wxDC &dc) |
| void | PaintAxis (wxDC &dc, const hugin_utils::FDiff2D &scale) |
| double | AxisRound (double d) const |
| void | Invalidate () |
Protected Attributes |
| std::vector< hugin_utils::FDiff2D > | m_points |
| double | x_min |
| double | y_min |
| double | x_max |
| double | y_max |
| double | m_XSpacing |
| double | m_YSpacing |
| int | m_axisDivLen |
| bool | m_axisEqual |
| bool | m_autosize |
| int | m_borderLeft |
| int | m_borderRight |
| int | m_borderTop |
| int | m_borderBottom |
| wxPen | m_curvePen |
| wxPen | m_axisPen |
| wxPen | m_gridPen |
Detailed Description
a basic plot widget.
Can plot only one curve. the axis limits can be set or calculated automatically.
The contrib/plot stuff shipped with wxWidgets has a very strange behaviour and design. I can't think of a situtation where using it can be used...
This based on code I recycled from some university assignment I wrote several years ago.
Constructor & Destructor Documentation
| Plot2DWindow::Plot2DWindow |
( |
wxWindow * |
parent, |
|
|
int |
id = -1, |
|
|
const wxPoint & |
pos = wxDefaultPosition, |
|
|
const wxSize & |
size = wxDefaultSize, |
|
|
long |
style = 0 |
|
) |
|
|
Member Function Documentation
| void Plot2DWindow::AutoSizeAxis |
( |
|
) |
|
|
|
|
calculate the axis limits based on the current curve
|
| void Plot2DWindow::AxisEqual |
( |
bool |
b |
) |
[inline] |
|
|
|
equal scaling factor on x and y axis
|
| double Plot2DWindow::AxisRound |
( |
double |
d |
) |
const [protected] |
|
| void Plot2DWindow::Invalidate |
( |
|
) |
[protected] |
|
| void Plot2DWindow::OnPaint |
( |
wxPaintEvent & |
event |
) |
[protected] |
|
| void Plot2DWindow::Paint |
( |
wxDC & |
dc |
) |
[protected] |
|
|
template<class Functor> |
| void Plot2DWindow::Plot |
( |
Functor & |
f, |
|
|
double |
startx, |
|
|
double |
endx, |
|
|
int |
nPoints = 100 |
|
) |
[inline] |
|
| void Plot2DWindow::SetAutosize |
( |
bool |
a |
) |
[inline] |
|
|
|
controls if the axis limits should be updated after each plot command
|
| void Plot2DWindow::SetAxisDivLen |
( |
int |
x |
) |
|
|
|
|
size of tick marks on the axis
|
| void Plot2DWindow::SetBorder |
( |
int |
x, |
|
|
int |
y |
|
) |
|
|
|
|
width/height of border around the plot space
|
|
|
set the curve points manually
|
| void Plot2DWindow::SetXSpacing |
( |
double |
x |
) |
[inline] |
|
|
|
set the spacing factor between the x and y labels
|
| void Plot2DWindow::SetYSpacing |
( |
double |
y |
) |
[inline] |
|
Member Data Documentation
The documentation for this class was generated from the following files: