{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# 2D Crosssection plots\n\nUse the output of a roxie 2d Plot and plot it with matplotlib\n\nDownload Input files\n\n* :download:`dipole_2d.data <../../../../../examples/input_files/dipole_2d.data>`\n* :download:`dipole_2d.post.xml <../../../../../examples/input_files/dipole_2d.post.xml>`\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Setting up\nStandard Loading of input, Parsing and Initializing RoxiePlotOutputs object\n\n\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "from roxieapi.output.plots import RoxiePlotOutputs\n\nplots = RoxiePlotOutputs(\n \"../input_files/dipole_2d.post.xml\", \"../input_files/dipole_2d.data\"\n)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Plotting the Roxie defined 2D plots\nLoad a 2D plot and show it's geometry\n\n\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "parser = plots.output\n\nxs = parser.get_crosssection_plot(1)\nassert xs is not None\n\nfigure = plots.plots2d.plot_xs(xs)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.19" } }, "nbformat": 4, "nbformat_minor": 0 }