{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "#include \"random.hpp\"\n", "#include \"xplot/xfigure.hpp\"\n", "#include \"xplot/xmarks.hpp\"\n", "#include \"xplot/xaxes.hpp\"" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "auto n = randint(1, 10);\n", "auto y = randn(n);" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "auto pie = xpl::pie_generator()\n", " .sizes(y)\n", " .display_labels(\"outside\")\n", " .finalize();" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "xpl::figure fig;\n", "fig.add_mark(pie);\n", "fig" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "fig.animation_duration = 1000;" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "n = randint(1, 10);\n", "pie.sizes = randn(n);" ] } ], "metadata": { "kernelspec": { "display_name": "C++14", "language": "C++14", "name": "xeus-cling-cpp14" }, "language_info": { "codemirror_mode": "text/x-c++src", "file_extension": ".cpp", "mimetype": "text/x-c++src", "name": "c++", "version": "14" } }, "nbformat": 4, "nbformat_minor": 2 }