.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gen/examples/output_parsing/plot_2d_crosssection.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_gen_examples_output_parsing_plot_2d_crosssection.py: 2D Crosssection plots =================== Use the output of a roxie 2d Plot and plot it with matplotlib Download Input files * :download:`dipole_2d.data <../../../../../examples/input_files/dipole_2d.data>` * :download:`dipole_2d.post.xml <../../../../../examples/input_files/dipole_2d.post.xml>` .. GENERATED FROM PYTHON SOURCE LINES 14-18 Setting up ---------- Standard Loading of input, Parsing and Initializing RoxiePlotOutputs object .. GENERATED FROM PYTHON SOURCE LINES 18-24 .. code-block:: Python from roxieapi.output.plots import RoxiePlotOutputs plots = RoxiePlotOutputs( "../input_files/dipole_2d.post.xml", "../input_files/dipole_2d.data" ) .. GENERATED FROM PYTHON SOURCE LINES 25-29 Plotting the Roxie defined 2D plots ----------------------------------- Load a 2D plot and show it's geometry .. GENERATED FROM PYTHON SOURCE LINES 29-36 .. code-block:: Python parser = plots.output xs = parser.get_crosssection_plot(1) assert xs is not None figure = plots.plots2d.plot_xs(xs) .. image-sg:: /gen/examples/output_parsing/images/sphx_glr_plot_2d_crosssection_001.png :alt: Plot2D 1 :srcset: /gen/examples/output_parsing/images/sphx_glr_plot_2d_crosssection_001.png, /gen/examples/output_parsing/images/sphx_glr_plot_2d_crosssection_001_2_00x.png 2.00x :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.584 seconds) .. _sphx_glr_download_gen_examples_output_parsing_plot_2d_crosssection.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_2d_crosssection.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_2d_crosssection.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_2d_crosssection.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_