In [ ]:
#include "random.hpp"
#include "xplot/xfigure.hpp"
#include "xplot/xmarks.hpp"
#include "xplot/xaxes.hpp"
In [ ]:
auto n = randint(1, 10);
auto y = randn(n);
In [ ]:
xpl::linear_scale sx, sy;
In [ ]:
auto pie = xpl::pie_generator(sx, sy)
.sizes(y)
.display_labels("outside")
.finalize();
In [ ]:
xpl::figure fig;
fig.add_mark(pie);
fig.display()
In [ ]:
fig.animation_duration = 1000;
In [ ]:
n = randint(1, 10);
pie.sizes = randn(n);
In [ ]: