In [1]:
#include "xplot/xfigure.hpp"
#include "xplot/xmarks.hpp"
#include "xplot/xaxes.hpp"

In [2]:
xpl::figure fig;
fig.display()



In [3]:
xpl::linear_scale sx, sy;

In [4]:
xpl::lines line(sx, sy);
line.x = std::vector<double>({0.0, 0.5, 1.0, 1.1, 1.2, 1.3});
line.y = std::vector<double>({0.0, 0.7, 0.5, 1.1, 1.2, 1.2});
fig.add_mark(line)

In [5]:
line.colors = std::vector<std::string>({"red"});

In [6]:
xpl::axis hx(sx), hy(sy);
hy.orientation = "vertical";
fig.add_axis(hx);
fig.add_axis(hy);

In [ ]: