Multiplot
0.5.5
|
#include <multiplot.h>
Classes | |
class | Color3f |
class | Point2d |
class | Trace |
Public Member Functions | |
Multiplot (const int x, const int y, const int w, const int h, const std::wstring &title_str_=L"www.andre-krause.net/multiplot", bool fullscreen=false) | |
Trace & | operator[] (int _trace) |
Trace & | operator() (int _trace) |
Trace & | trace (unsigned int _trace) |
void | plot (const float x, const float y) |
template<class T > | |
void | plot (const std::vector< T > &v) |
template<class T > | |
void | plot (const std::vector< T > &vx, const std::vector< T > &vy) |
void | color3f (float r, float g, float b) |
void | title (const std::wstring &title_) |
void | title (const std::string &title_) |
void | linewidth (float width) |
void | pointsize (float psize) |
void | scrolling (int max_points_to_plot) |
void | scaling (enum MP_SCALING sc, float x_min=-10, float x_max=10, float y_min=-10, float y_max=10) |
void | sleep (unsigned int milliseconds_) |
void | 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 | bg_color (float r, float g, float b) |
void | 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 &title_, bool fullscreen_) | |
bool | check () |
void | caption (const std::string &t) |
void | caption (const std::wstring &t) |
void | redraw () |
Protected Member Functions | |
void | initgl () |
Point2d | draw_grid () |
virtual void | draw () |
Protected Attributes | |
float | cur_point_size = 0.0f |
unsigned int | cur_trace = 0 |
std::wstring | title_str |
std::wstring | caption_str |
Color3f | bg_col { 0.0f, 0.0f, 0.0f } |
Color3f | grid_col { 0.8f, 0.8f, 0.8f } |
MP_SCALING | scaling_ = MP_AUTO_SCALE |
Point2d | range_min |
Point2d | range_max |
Point2d | minimum { -std::numeric_limits<float>::max() , -std::numeric_limits<float>::max() } |
Point2d | maximum { std::numeric_limits<float>::max() , std::numeric_limits<float>::max() } |
Point2d | scale |
Point2d | offset |
std::vector< Trace > | traces |
int | gridx = MP_NO_GRID |
int | gridy = MP_NO_GRID |
float | gridx_step = -1 |
float | gridy_step = -1 |
float | grid_linewidth = 1.0f |
Point2d | grid_spacing |
![]() | |
unsigned int | width = 0 |
unsigned int | height = 0 |
std::string | caption_str |
this class creates a window to wich you can add an arbitrary number of autoscaling traces.
|
inline |
sets the background color
|
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 |
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 |
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 |
plots the values of vector vx and vy to the currently active trace. vx and vy must have the same length. select a trace with a call to trace(int _tracenumber);
|
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 |
sleeps for the given amount of milliseconds useful to control the speed of animated graphs.
|
inline |
sets the window title given a wide string.
|
inline |
sets the window title given a string or char*.
|
inline |
sets the current trace. traces are numbered from zero to N. memory for the traces is automatically allocated.