{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "#include \"xplot/xfigure.hpp\"\n", "#include \"xplot/xmarks.hpp\"\n", "#include \"xplot/xaxes.hpp\"" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "xpl::figure fig;\n", "fig" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "xpl::linear_scale sx, sy;" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "xpl::lines line(sx, sy);\n", "line.x = std::vector({0.0, 0.5, 1.0, 1.1, 1.2, 1.3});\n", "line.y = std::vector({0.0, 0.7, 0.5, 1.1, 1.2, 1.2});\n", "fig.add_mark(line)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "line.colors = std::vector({\"red\"});" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "xpl::axis hx(sx), hy(sy);\n", "hy.orientation = \"vertical\";\n", "fig.add_axis(hx);\n", "fig.add_axis(hy);" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "fig.remove_mark(line)" ] } ], "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 }