#include "random.hpp"
#include "xplot/xfigure.hpp"
#include "xplot/xmarks.hpp"
#include "xplot/xaxes.hpp"
std::size_t size = 10;
std::vector<double> x(size);
std::iota(x.begin(), x.end(), 0);
std::vector<double> y = randn(size);
xpl::ordinal_scale xs;
xpl::linear_scale ys;
xpl::bars bar(xs, ys);
bar.x = x;
bar.y = y;
bar.padding = 0.5;
xpl::figure fig;
fig.add_mark(bar);
fig
xpl::axis hx(xs), hy(ys);
hy.orientation = "vertical";
fig.add_axis(hx);
fig.add_axis(hy);
std::vector<double> opacities(10);
std::fill(opacities.begin(), opacities.end(), 0.5);
bar.opacities = opacities;
bar.colors = std::vector<std::string>({"blue"});