114 #ifndef MULTIPLOT_FLTK 115 #define MULTIPLOT_WIN32 118 #define MULTIPLOT_FLTK 137 #ifdef MULTIPLOT_FLTK // tell multiplot to use Fltk to create an Opengl-Window 140 #include <FL/Fl_Gl_Window.H> 141 #include <FL/fl_draw.H> 144 #if defined(_WIN32) && !defined(APIENTRY) 145 #define WIN32_LEAN_AND_MEAN 1 148 #pragma message("_Adding library: opengl32.lib" ) 149 #pragma comment ( lib, "opengl32.lib") 187 #ifdef MULTIPLOT_FLTK 192 unsigned int width = 0;
193 unsigned int height = 0;
194 std::string caption_str;
200 Multiplot_base(
int x,
int y,
int w,
int h,
const std::wstring& title_,
bool fullscreen_) : Fl_Gl_Window(x,y,w,h)
212 if (Fl::check()) {
return true; }
else return false;
215 virtual void draw()
override 225 void caption(
const std::string& t)
228 this->label(caption_str.c_str());
230 void caption(
const std::wstring& t)
233 using convert_type = std::codecvt_utf8<wchar_t>;
234 caption_str = std::wstring_convert<convert_type, wchar_t>().to_bytes(t);
235 this->label(caption_str.c_str());
241 Fl_Gl_Window::redraw();
247 #ifdef MULTIPLOT_WIN32 259 std::wstring title_str;
270 static LRESULT CALLBACK StaticWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
275 if(uMsg == WM_CREATE)
277 pParent = (
Multiplot_base*)((LPCREATESTRUCT)lParam)->lpCreateParams;
278 SetWindowLongPtr(hWnd, GWLP_USERDATA,(LONG_PTR)pParent);
283 if(!pParent)
return DefWindowProc(hWnd,uMsg,wParam,lParam);
286 pParent->hWnd = hWnd;
287 return pParent->WndProc(uMsg,wParam,lParam);
317 case SC_MONITORPOWER:
343 width = LOWORD(lParam);
344 height = HIWORD(lParam);
351 return DefWindowProc(hWnd,uMsg,wParam,lParam);
363 bool CreateGLWindow(
int x,
int y,
int width,
int height,
const std::wstring& title, BYTE bits=0,
bool fullscreenflag=
false)
370 WindowRect.left=(long)0;
371 WindowRect.right=(long)width;
372 WindowRect.top=(long)0;
373 WindowRect.bottom=(long)height;
375 fullscreen=fullscreenflag;
378 hInstance = GetModuleHandle(NULL);
379 wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
380 wc.lpfnWndProc = (WNDPROC) (Multiplot_base::StaticWndProc);
383 wc.hInstance = hInstance;
384 wc.hIcon = LoadIcon(NULL, IDI_WINLOGO);
385 wc.hCursor = LoadCursor(NULL, IDC_ARROW);
386 wc.hbrBackground = NULL;
387 wc.lpszMenuName = NULL;
388 wc.lpszClassName = L
"OpenGL";
391 if (!RegisterClass(&wc))
393 throw std::exception(
"Failed To Register The Window Class.");
398 DEVMODE dmScreenSettings;
399 memset(&dmScreenSettings,0,
sizeof(dmScreenSettings));
400 dmScreenSettings.dmSize=
sizeof(dmScreenSettings);
401 dmScreenSettings.dmPelsWidth = width;
402 dmScreenSettings.dmPelsHeight = height;
403 dmScreenSettings.dmBitsPerPel = bits;
404 dmScreenSettings.dmFields=DM_BITSPERPEL|DM_PELSWIDTH|DM_PELSHEIGHT;
407 if (ChangeDisplaySettings(&dmScreenSettings,CDS_FULLSCREEN)!=DISP_CHANGE_SUCCESSFUL)
410 std::cerr <<
"The Requested Fullscreen Mode is not supported by your Video Card. Using Windowed Mode instead." << std::endl;
417 dwExStyle=WS_EX_APPWINDOW;
423 dwExStyle=WS_EX_APPWINDOW | WS_EX_WINDOWEDGE;
424 dwStyle=WS_OVERLAPPEDWINDOW;
427 AdjustWindowRectEx(&WindowRect, dwStyle, FALSE, dwExStyle);
430 if (!(hWnd=CreateWindowEx( dwExStyle,
437 WindowRect.right-WindowRect.left,
438 WindowRect.bottom-WindowRect.top,
445 throw std::exception(
"Window Creation Error.");
448 static PIXELFORMATDESCRIPTOR pfd=
450 sizeof(PIXELFORMATDESCRIPTOR),
470 if (!(hDC=GetDC(hWnd)))
473 throw std::exception(
"Can't Create A GL Device Context.");
476 if (!(PixelFormat=ChoosePixelFormat(hDC,&pfd)))
479 throw(std::exception(
"Can't Find A Suitable PixelFormat."));
482 if(!SetPixelFormat(hDC,PixelFormat,&pfd))
485 throw(std::exception(
"Can't Set The PixelFormat."));
488 if (!(hRC=wglCreateContext(hDC)))
490 throw(std::exception(
"Can't Create A GL Rendering Context."));
493 if(!wglMakeCurrent(hDC,hRC))
495 throw(std::exception(
"Can't Activate The GL Rendering Context."));
498 ShowWindow(hWnd,SW_SHOW);
499 SetForegroundWindow(hWnd);
513 void DestroyGLWindow()
518 ChangeDisplaySettings(NULL,0);
524 if (!wglMakeCurrent(NULL,NULL))
526 throw(std::exception(
"Release Of DC And RC Failed."));
529 if (!wglDeleteContext(hRC))
531 throw(std::exception(
"Release Rendering Context Failed."));
536 if (hDC && !ReleaseDC(hWnd,hDC))
538 throw(std::exception(
"Release Device Context Failed."));
542 if (hWnd && !DestroyWindow(hWnd))
544 throw(std::exception(
"Could Not Release hWnd."));
548 if (!UnregisterClass(L
"OpenGL",hInstance))
550 throw(std::exception(
"Could Not Unregister Class."));
555 static LRESULT CALLBACK window_handler( HWND hWnd,
581 case SC_MONITORPOWER:
608 int xx = LOWORD(lParam);
619 return DefWindowProc(hWnd,uMsg,wParam,lParam);
631 Multiplot_base(
int x,
int y,
int w,
int h,
const std::wstring& ttitle,
bool fullscreen)
634 CreateGLWindow(x, y, w, h, ttitle, 32, fullscreen);
658 if (GetAsyncKeyState(VK_ESCAPE) & 0x8000) { ok =
false; }
661 if(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
663 TranslateMessage(&msg);
664 DispatchMessage(&msg);
670 unsigned int w() {
return width; }
671 unsigned int h() {
return height; }
672 bool valid() {
return valid_; }
673 void valid(
bool v) { valid_=v; }
679 void caption(
const std::wstring& t)
682 SetWindowText(hWnd, title_str.c_str());
711 Color3f(
float r_,
float g_,
float b_) { r = r_; g = g_; b = b_; }
722 float point_size = 0.0f;
723 float line_width = 1.0f;
726 Point2d(
float xx,
float yy,
float rr=1,
float gg=1,
float bb=1,
float _lwidth=1.0,
float _point_size=0.0)
730 point_size=_point_size;
745 class Trace :
public std::vector<Point2d>
748 unsigned int max_points_to_plot = std::numeric_limits<unsigned int>::max();
750 unsigned int pos = 0;
751 float cur_col[3]{ 1.0f, 1.0f, 1.0f };
752 float cur_line_width = 1.0f;
753 float cur_point_size = 0.0f;
757 if (size() == 0) {
return; }
766 float line_width = at(start % size()).line_width;
767 glLineWidth(line_width);
769 for(
unsigned int a=start;a<start+size()-1;a++)
771 p1=(*this)[a % size()];
772 p2=(*this)[(a+1) % size()];
782 if(p1.line_width != line_width)
785 line_width = p1.line_width;
786 glLineWidth(line_width);
789 glColor3f(p1.r,p1.g,p1.b);
790 glVertex2f((p1.x-offset.x)*scale.x,(p1.y-offset.y)*scale.y);
791 glColor3f(p2.r,p2.g,p2.b);
792 glVertex2f((p2.x-offset.x)*scale.x,(p2.y-offset.y)*scale.y);
794 if(p1.x>maximum.x)maximum.x=p1.x;
795 if(p1.x<minimum.x)minimum.x=p1.x;
796 if(p1.y>maximum.y)maximum.y=p1.y;
797 if(p1.y<minimum.y)minimum.y=p1.y;
800 if(p2.x>maximum.x)maximum.x=p2.x;
801 if(p2.x<minimum.x)minimum.x=p2.x;
802 if(p2.y>maximum.y)maximum.y=p2.y;
803 if(p2.y<minimum.y)minimum.y=p2.y;
806 float point_size=at(start%size()).line_width;
807 glPointSize(point_size);
809 for(
unsigned int a=start;a<start+size();a++)
815 if(p.point_size != point_size)
818 point_size = p.point_size;
819 glPointSize(point_size);
822 glColor3f(p.r,p.g,p.b);
823 glVertex2f((p.x-offset.x)*scale.x,(p.y-offset.y)*scale.y);
835 void plot(
const float x,
const float y)
838 Point2d p(x,y, cur_col[0], cur_col[1], cur_col[2], cur_line_width, cur_point_size);
853 if(pos >= max_points_to_plot){ pos = 0; }
894 max_points_to_plot = number_of_points_to_plot_;
896 if(max_points_to_plot <= 0)
909 void clear() { std::vector<Point2d>::clear(); pos=0; }
913 virtual ~
Multiplot() { hide(); check(); }
915 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) :
Multiplot_base(x,y,w,h, title_str_,fullscreen)
917 title_str = title_str_;
918 traces.push_back( Trace() );
940 if(traces.size() <= cur_trace )
942 for(
size_t a = 0; a < cur_trace - traces.size() + 1; a++)
943 traces.push_back(
Trace());
945 return traces[_trace];
952 void plot(
const float x,
const float y) { traces[cur_trace].plot(x,y); }
959 template<
class T>
void plot(
const std::vector<T>& v)
961 for(
size_t x=0;x<v.size();x++)
963 traces[cur_trace].plot(
float(x),
float(v[x]));
972 template<
class T>
void plot(
const std::vector<T>& vx,
const std::vector<T>& vy)
974 if (vx.size() != vy.size()) {
throw std::length_error(
"Multiplot: both vectors must have the same length.\n"); }
975 for (
size_t i = 0; i<vx.size(); i++)
977 traces[cur_trace].plot(
float(vx[i]),
float(vy[i]));
984 void color3f(
float r,
float g,
float b) { traces[cur_trace].color3f(r,g,b); }
989 void title(
const std::wstring& title_) { title_str = title_; }
994 void title(
const std::string& title_) { title_str = std::wstring(title_.begin(), title_.end()); }
999 void linewidth(
float width){ traces[cur_trace].linewidth(width); }
1003 void pointsize(
float psize){ traces[cur_trace].pointsize(psize); }
1007 void scrolling(
int max_points_to_plot){ traces[cur_trace].scrolling(max_points_to_plot); }
1015 void scaling(
enum MP_SCALING sc,
float x_min=-10,
float x_max= 10,
float y_min=-10,
float y_max=10)
1018 range_min.x = x_min;
1019 range_min.y = y_min;
1020 range_max.x = x_max;
1021 range_max.y = y_max;
1032 using namespace std;
1033 this_thread::sleep_for(chrono::milliseconds(milliseconds_));
1045 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)
1049 gridx_step=ggridx_step;
1050 gridy_step=ggridy_step;
1062 glClearColor(bg_col.r, bg_col.g, bg_col.b, 1);
1082 for (
unsigned int a = 0; a < traces.size(); a++)
1096 traces[
trace].clear();
1097 traces[
trace].pos=0;
1101 float cur_point_size = 0.0f;
1102 unsigned int cur_trace = 0;
1104 std::wstring title_str;
1105 std::wstring caption_str;
1106 Color3f bg_col { 0.0f, 0.0f, 0.0f };
1107 Color3f grid_col{ 0.8f, 0.8f, 0.8f };
1112 MP_SCALING scaling_ = MP_AUTO_SCALE;
1113 Point2d range_min, range_max;
1114 Point2d minimum{ -std::numeric_limits<float>::max() , -std::numeric_limits<float>::max() };
1115 Point2d maximum{ std::numeric_limits<float>::max() , std::numeric_limits<float>::max() };
1120 std::vector< Trace > traces;
1123 int gridx = MP_NO_GRID;
1124 int gridy = MP_NO_GRID;
1125 float gridx_step = -1;
1126 float gridy_step = -1;
1127 float grid_linewidth = 1.0f;
1128 Point2d grid_spacing;
1132 glViewport(0 , 0,width ,height);
1133 glMatrixMode(GL_PROJECTION);
1135 glOrtho( 0, width, 0, height, -1, 1 );
1137 glMatrixMode(GL_MODELVIEW);
1139 glDisable(GL_DEPTH_TEST);
1140 glDisable(GL_LIGHTING);
1141 glShadeModel(GL_SMOOTH);
1142 glClearColor(bg_col.r, bg_col.g, bg_col.b, 1);
1143 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
1150 if(gridx==MP_LINEAR_GRID)
1152 double diff=maximum.x - minimum.x;
1153 if(diff==0)
return Point2d(0,0);
1154 double exp=floor(log10(fabs(diff)));
1155 double shiftscale=pow(10.0,exp);
1157 double startx=shiftscale*floor(minimum.x / shiftscale);
1165 xstep=shiftscale*1.0;
1178 glLineWidth(grid_linewidth);
1179 glColor3f(grid_col.r, grid_col.g, grid_col.b);
1182 while(x<maximum.x && bailout<100)
1186 glVertex2f((GLfloat)(x-offset.x)*scale.x ,0.0f );
1187 glVertex2f((GLfloat)(x-offset.x)*scale.x ,(
float)height);
1191 if(gridy==MP_LINEAR_GRID)
1193 double diff=maximum.y - minimum.y;
1194 if(diff==0)
return Point2d(0,0);
1195 double exp=floor(log10(fabs(diff)));
1196 double shiftscale=pow(10.0,exp);
1198 double starty=shiftscale*floor(minimum.y / shiftscale);
1206 ystep=shiftscale*1.0;
1219 glColor3f(grid_col.r, grid_col.g, grid_col.b);
1222 while(y<maximum.y && bailout<100)
1226 glVertex2f(0.0f ,(GLfloat)(y-offset.y)*scale.y);
1227 glVertex2f((
float)width ,(GLfloat)(y-offset.y)*scale.y);
1231 #ifdef MULTIPLOT_FLTK // gl_font is only available with fltk... 1244 while(y<maximum.y && bailout<100)
1248 s = std::to_string(y);
1249 glRasterPos2f(0.5f, (GLfloat)(y-offset.y)*scale.y + 1 );
1250 gl_draw(s.c_str(), int(s.length()));
1256 return Point2d((
float)xstep,(
float)ystep);
1261 using namespace std;
1271 Multiplot_base::draw();
1273 glClear(GL_COLOR_BUFFER_BIT);
1277 grid_spacing=draw_grid();
1280 glLineWidth(2.0f*grid_linewidth);
1281 glColor3f(grid_col.r, grid_col.g, grid_col.b);
1283 glVertex2f(0.0f ,0-offset.y*scale.y);
1284 glVertex2f((
float)width ,0-offset.y*scale.y);
1285 glVertex2f(0-offset.x*scale.x ,0.0f );
1286 glVertex2f(0-offset.x*scale.x ,(
float)height);
1291 maximum.x=maximum.y= -std::numeric_limits<float>::max();
1292 minimum.x=minimum.y= std::numeric_limits<float>::max();
1294 for(
size_t t=0;t<traces.size();t++)
1296 traces[t].draw(minimum, maximum, scale, offset);
1304 float diff_x = maximum.x-minimum.x;
1305 float diff_y = maximum.y-minimum.y;
1309 if (diff_x != 0.0) { scale.x = width / diff_x; }
1310 if (diff_y != 0.0) { scale.y = height / diff_y; }
1312 case MP_AUTO_SCALE_EQUAL:
1314 if(std::max(diff_x, diff_y) != 0)
1316 scale.x=scale.y=std::min(width, height) / std::max(diff_x, diff_y);
1320 case MP_FIXED_SCALE:
1321 scale.x = width /(range_max.x - range_min.x);
1322 scale.y = height/(range_max.y - range_min.y);
1323 offset.x = range_min.x;
1324 offset.y = range_min.y;
1330 caption_str = title_str + L
" ";
1331 caption_str += L
"x=[" + to_wstring(minimum.x) + L
", " + to_wstring(maximum.x) + L
"] ";
1332 caption_str += L
"y=[" + to_wstring(minimum.y) + L
", " + to_wstring(maximum.y) + L
"] ";
1333 if(gridx != MP_NO_GRID || gridy != MP_NO_GRID)
1335 caption_str += L
"dx=[" + to_wstring(grid_spacing.x) + L
"] ";
1336 caption_str += L
"dy=[" + to_wstring(grid_spacing.y) + L
"] ";
1339 caption(caption_str.c_str() );
1347 #ifdef __TEST_THIS_MODULE__ 1354 using namespace std;
1355 using namespace multiplot;
1363 #ifdef MULTIPLOT_FLTK 1365 #pragma comment(lib, "fltk14/bin/lib/Debug/fltkd.lib") 1366 #pragma comment(lib, "fltk14/bin/lib/Debug/fltk_gld.lib") 1369 #pragma comment(lib, "fltk14/bin/lib/Release/fltk.lib") 1370 #pragma comment(lib, "fltk14/bin/lib/Release/fltk_gl.lib") 1375 #pragma comment(lib, "wsock32.lib") 1376 #pragma comment(lib, "comctl32.lib") 1377 #pragma comment(lib, "glu32.lib") 1378 #pragma comment(lib, "opengl32.lib") 1379 #pragma comment(lib, "Ws2_32.lib") 1380 #pragma comment(lib, "User32.lib") 1403 using namespace multiplot;
1413 for(
int x=0;x<300;x++)
1416 m.
plot(
float(x), 0.1f*x*sin(0.1f*x));
1420 if (!m.check()) {
break; }
1436 m.
grid(MP_LINEAR_GRID,MP_LINEAR_GRID);
1447 for(
int x=0;x<300;x++)
1452 m.
plot(
float(x), 0.1f*x*sin(x/5.0f));
1456 m.
plot(
float(x), 0.1f*x*sin(x/6.0f));
1460 if (!m.check()) {
break; }
1473 m.
grid(MP_LINEAR_GRID, MP_LOG_GRID);
1481 for(
int x=0;x<1000;x++)
1486 m[0].
color3f(1, 0.01f*(x%100), 0.05f*(x%20) );
1487 m[0].
plot(0.1f*x*cos(x/5.0f), 0.1f*x*sin(x/5.0f));
1489 m[1].
color3f(0.1f*(x%10), 0.05f*(x%20), 0.01f*(x%100) );
1490 m[1].
plot(0.1f*x*cos(x/20.0f), 0.1f*x*sin(x/5.0f));
1493 if (!m.check()) {
break; }
1508 for(
int x=0;x<3000;x++)
1510 m.
color3f(1, 0.01f*(x%100), 0.05f*(x%20) );
1514 for(
int b=0;b<10;b++)
1517 float rx = -5 + 10.0f*rand()/RAND_MAX;
1518 float ry = -5 + 10.0f*rand()/RAND_MAX;
1520 float gval = exp(-(rx*rx + ry*ry));
1521 if(1.0*rand()/RAND_MAX < gval)
1529 if (!m.check()) {
break; }
1542 for(
int x=0;x<1000;x++)
1544 m.
plot(
float(x), 0.1f*x*sin(0.1f*x));
1546 if (!m.check()) {
break; }
1559 vector<float> v1, v2, vx, vy;
1560 for (
int a = 0; a<100; a++)
1562 v1.push_back(sin(0.3f*a));
1563 v2.push_back(cos(0.3f*a) + 2.5f);
1577 vector<float> vx, vy;
1578 m.
scaling(MP_FIXED_SCALE, -1.5f, 1.5f, -1.5f, 1.5f);
1579 for (
int i = 0; i < 1000; i++)
1584 for (
int a = 0; a<250; a++)
1587 vx.push_back(sin(0.1f*a));
1588 vy.push_back(cos(((0.1f + 0.0001f*i)*a)));
1595 if (!m.check()) {
break; }
1604 m.
scaling(MP_FIXED_SCALE, 0, 300, -20, 20);
1607 for (
int x = 0; x < 300; x++)
1609 m.
plot(
float(x), 0.1f*x*sin(0.1f*x));
1611 if (!m.check()) {
break; }
1619 #ifndef MULTIPLOT_FLTK 1620 cerr <<
"More than one Multiplot window is currently only supported with FLTK as a backend.\n";
1627 m1.title(
"Plot Window 1: ");
1628 m2.title(
"Plot Window 2: ");
1633 for (
int x = 0; x < 300; x++)
1635 m1.plot(
float(x), 0.1f*x*sin(0.1f*x));
1636 m2.plot(
float(x), 0.1f*x*cos(0.1f*x));
1639 if (!m1.check()) {
break; }
1643 while (m1.check() || m2.check())
1655 std::cout <<
"\nSeveral multiplot demos. press ESC inside the multiplot window to stop a demo and test the next demo.\n";
1657 int demo_number = 0;
1659 std::cout <<
"\n\n === Menu ===";
1660 std::cout <<
"\n(1) demo: most basic/ simple usage. plots a sine wave.";
1661 std::cout <<
"\n(2) demo: two traces in a multiplot window with colors and scrolling.";
1662 std::cout <<
"\n(3) demo: more settings (point size, line-width and grid).";
1663 std::cout <<
"\n(4) demo: how to do a scatter plot (random gauss distribution).";
1664 std::cout <<
"\n(5) demo: fullscreen mode";
1665 std::cout <<
"\n(6) demo: plot the values stored in a std::vector<float>";
1666 std::cout <<
"\n(7) demo: plot(vx, vy) - the values stored in two vectors vx and vy (animated lissajous figure)";
1667 std::cout <<
"\n(8) demo: no auto-scaling, set fixed scaling of both x and y axis.";
1668 std::cout <<
"\n(9) demo: using two or more Multiplot windows simulataneously.";
1669 std::cout <<
"\n(0) exit.";
1670 std::cout <<
"\nenter number of demo (1..8):";
1671 std::cin >> demo_number;
1672 switch (demo_number)
1674 case 1:demo1();
break;
1675 case 2:demo2();
break;
1676 case 3:demo3();
break;
1677 case 4:demo4();
break;
1678 case 5:demo5();
break;
1679 case 6:demo6();
break;
1680 case 7:demo7();
break;
1681 case 8:demo8();
break;
1682 case 9:demo9();
break;
1683 case 0:
return;
break;
1684 default:demo1();
break;
void pointsize(float psize)
Definition: multiplot.h:884
void grid_color(float r, float g, float b)
Definition: multiplot.h:1069
void plot(const std::vector< T > &v)
Definition: multiplot.h:959
Multiplot_base(int x, int y, int w, int h, const std::wstring &title_, bool fullscreen_)
Definition: multiplot.h:200
void title(const std::wstring &title_)
Definition: multiplot.h:989
void clear_all()
Definition: multiplot.h:1080
Trace & trace(unsigned int _trace)
Definition: multiplot.h:936
void sleep(unsigned int milliseconds_)
Definition: multiplot.h:1030
void plot(const float x, const float y)
Definition: multiplot.h:952
void pointsize(float psize)
Definition: multiplot.h:1003
Definition: multiplot.h:702
void plot(const float x, const float y)
Definition: multiplot.h:835
void color3f(float r, float g, float b)
Definition: multiplot.h:984
Definition: multiplot.h:714
void clear()
Definition: multiplot.h:909
void plot(const std::vector< T > &vx, const std::vector< T > &vy)
Definition: multiplot.h:972
Trace & operator[](int _trace)
Definition: multiplot.h:926
void color3f(float r, float g, float b)
Definition: multiplot.h:865
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)
Definition: multiplot.h:1045
void clear(int trace)
Definition: multiplot.h:1094
void scrolling(int number_of_points_to_plot_)
Definition: multiplot.h:892
Definition: multiplot.h:189
Trace & operator()(int _trace)
Definition: multiplot.h:930
void bg_color(float r, float g, float b)
Definition: multiplot.h:1057
Definition: multiplot.h:705
Definition: multiplot.h:745
void linewidth(float width)
Definition: multiplot.h:877
void title(const std::string &title_)
Definition: multiplot.h:994
void scrolling(int max_points_to_plot)
Definition: multiplot.h:1007
void linewidth(float width)
Definition: multiplot.h:999
void scaling(enum MP_SCALING sc, float x_min=-10, float x_max=10, float y_min=-10, float y_max=10)
Definition: multiplot.h:1015