Skip to content

Cryoris/mathgl-figure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MathGL Figure

Dependencies

Installation

UNIX (Linux, Mac OS X)

$ mkdir build
$ cd build
$ cmake ..
$ sudo make install

Example

opening example

#include <vector>
#include <Eigen/Dense>
#include "mathgl-figure/figure.hpp"

int main()
{
  std::vector<double> x(10), y(10);
  for (int i = 1; i <= 10; ++i){ 
    x[i] = i; y[i] = std::exp(std::cos(0.2*i));
  }
  Eigen::VectorXd u = Eigen::VectorXd::LinSpaced(500, 1, 10),
                  v = ( (0.2*u.array()).cos().exp() ).matrix();
  mgl::Figure fig;
  fig.plot(x, y, " +r").label("Sample Data");
  fig.plot(u, v, "b").label("Function");
  fig.legend();
  fig.save("plot.eps");
  return 0;
}

For more examples see the documentation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published