From 00e15ad28a959a0c071ede4eec0cbc662605153f Mon Sep 17 00:00:00 2001 From: hyhuang Date: Sat, 9 Sep 2017 23:29:09 +0800 Subject: [PATCH] add nonblock mode of show and an example --- examples/nonblock.cpp | 46 +++++++++++++++++++++++++++++++++++++++++++ matplotlibcpp.h | 33 ++++++++++++++++++++----------- 2 files changed, 68 insertions(+), 11 deletions(-) create mode 100644 examples/nonblock.cpp diff --git a/examples/nonblock.cpp b/examples/nonblock.cpp new file mode 100644 index 0000000..ca535a4 --- /dev/null +++ b/examples/nonblock.cpp @@ -0,0 +1,46 @@ +#define _USE_MATH_DEFINES +#include +#include "matplotlibcpp.h" + +namespace plt = matplotlibcpp; + + +using namespace matplotlibcpp; +using namespace std; + +int main() +{ + // Prepare data. + int n = 5000; + std::vector x(n), y(n), z(n), w(n,2); + for(int i=0; i struct Check; template - static std::true_type test( ... ); // use a variadic function to make sure (1) it accepts everything and (2) its always the worst match + static std::true_type test( ... ); // use a variadic function to makemake sure (1) it accepts everything and (2) its always the worst match template static std::false_type test( Check* );