Multiplot
0.5.5
|
#include <multiplot.h>
Classes | |
class | Point2d |
class | Trace |
Public Member Functions | |
Multiplot (const int x, const int y, const int w, const int h, const std::wstring &ttitle=L"Multiplot - updates on www.andre-krause.net", bool fullscreen=false) | |
Trace & | operator[] (int _trace) |
Trace & | operator() (int _trace) |
Trace & | trace (int _trace) |
void | plot (const float x, const float y) |
template<class T > | |
void | plot (const std::vector< T > &v) |
void | color3f (float r, float g, float b) |
void | set_title (const std::wstring &title_) |
void | set_linewidth (float width) |
void | set_pointsize (float psize) |
void | set_scrolling (int max_points_to_plot) |
void | set_scaling (enum MP_SCALING sc, float x_min=-10, float x_max=10, float y_min=-10, float y_max=10) |
void | set_grid (enum MP_GRIDSTYLE ggridx=MP_LINEAR_GRID, enum MP_GRIDSTYLE ggridy=MP_LINEAR_GRID, float ggridx_step=-1.0, float ggridy_step=-1.0, float w=1.0) |
void | set_bg_color (float r, float g, float b) |
void | set_grid_color (float r, float g, float b) |
void | clear_all () |
void | clear (int trace) |
![]() | |
Multiplot_base (int x, int y, int w, int h, const std::wstring &ttitle, bool fullscreen) | |
void | show () |
bool | check () |
unsigned int | w () |
unsigned int | h () |
bool | valid () |
void | valid (bool v) |
void | set_caption (const std::wstring &t) |
void | redraw () |
Protected Member Functions | |
void | initgl () |
Point2d | draw_grid () |
virtual void | draw () |
![]() | |
LRESULT | WndProc (UINT uMsg, WPARAM wParam, LPARAM lParam) |
bool | CreateGLWindow (int x, int y, int width, int height, const std::wstring &title, BYTE bits=0, bool fullscreenflag=false) |
void | DestroyGLWindow () |
Protected Attributes | |
float | cur_point_size |
unsigned int | cur_trace |
std::wstring | title |
Point2d | bg_color |
Point2d | grid_color |
int | scaling_ |
Point2d | range_min |
Point2d | range_max |
Point2d | minimum |
Point2d | maximum |
Point2d | scale |
Point2d | offset |
std::vector< Trace > | traces |
int | gridx |
int | gridy |
float | gridx_step |
float | gridy_step |
float | grid_linewidth |
Point2d | grid_spacing |
![]() | |
unsigned int | width |
unsigned int | height |
bool | valid_ |
bool | active |
bool | fullscreen |
HDC | hDC |
HGLRC | hRC |
HWND | hWnd |
HINSTANCE | hInstance |
Additional Inherited Members | |
![]() | |
static LRESULT CALLBACK | StaticWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) |
static LRESULT CALLBACK | window_handler (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) |
this class creates a window to wich you can add an arbitrary number of autoscaling traces.
|
inline |
this function call clears trace number t
|
inline |
this function call simply clears all traces
|
inline |
change current drawing color for current trace.
|
inline |
Access function. allows direct access to a trace.
|
inline |
Access function. allows direct access to a trace.
|
inline |
plots a point at x,y to the currently active trace. select a trace with a call to trace(int _tracenumber);
|
inline |
plots a vector of values to the currently active trace. the x value is running from 0 .. vector.size()-1 select a trace with a call to trace(int _tracenumber);
|
inline |
sets the background color
|
inline |
call this function if you wish a grid to be plotted in your graph. by default, no grids are plotted. call this function with the first two arguments set to either MP_NO_GRID, MP_LINEAR_GRID or MP_LOG_GRID. the next two arguments gridx_step and gridy_step specify the grid spacing. Zero or a negative value like -1 enables auto - spacing. The last parameter w sets the grid-linewidth. the default is 1 pixel.
|
inline |
sets the grid color
|
inline |
changes current line width.
|
inline |
changes current point size.
|
inline |
changes the (auto-)scaling behaviour of the multiplot window. you can choose between MP_AUTO_SCALE MP_AUTO_SCALE_EQUAL MP_FIXED_SCALE
|
inline |
changes scrolling behaviour for current trace - see class Trace for details.
|
inline |
sets the window title.
|
inline |
sets the current trace. traces are numbered from zero to N. memory for the traces is automatically allocated.