Skip to content
jonatanolofsson edited this page Jan 25, 2012 · 5 revisions

Welcome to the cpplot wiki!

cpplot is a plotting library originally based on matplotpp, but is now however almost fully rewritten and restructured.

The library is suited for academic use, and support - by inheritance from Yuichi Katori's work on matplotpp - many of the matlab plotting tools and also extended support for live plotting and animation.

Examples are provided in the sources.

More information will be available at a later time, but the library is now freely available under the GPLv3 license.

Samples

cpplot can do anything that matplotpp is capable of, including those plots that were plotted by Yuichi Katori in matplotpp; (images at matplotpp website)

Minimal example

#include "cpplot.hpp"
int main(int argc, char* argv[]){
    using namespace cpplot;
    glut::init(argc, argv);

    std::vector<double> x(100),y(100);
    for(int i = 0; i < 100; ++i) { x[i] = 0.1*i; y[i] = sin(x[i]); }

    // This is all the work, really
    plot(x,y);

    // Do something else for a while.. cpplot runs glut in a separate thread
    while(true) boost::this_thread::yield();
}

Again, more examples are in the sources!

Clone this wiki locally