""" 3D plots =================== Plot the 3D geometry and results Download Input files * :download:`dipole_3d.data <../../../../../examples/input_files/dipole_3d.data>` * :download:`dipole_3d.post.xml <../../../../../examples/input_files/dipole_3d.post.xml>` """ # %% # Setting up # ---------- # Standard Loading of input, Parsing and Initializing RoxiePlotOutputs object # from roxieapi.output.plots import RoxiePlotOutputs plots = RoxiePlotOutputs( "../input_files/dipole_3d.post.xml", "../input_files/dipole_3d.data" ) # %% # Extracting plot information # ----------------------------------- # Load 3D plot and get plot information # parser = plots.output p3d = parser.get_3d_plot(1) # We load Plot Number 1 (defined in datafile) assert p3d is not None # %% # Create the plot # --------------- figure = plots.plots3d.plot_3d(p3d) figure.show() # %% # Changing the dataset to plot # ---------------------------- print("Available Datasets:") for id, pl in enumerate(p3d.coilPlots): print(f"Index {id} with label {pl.label}") # Set the new prefered dataset: p3d.active = p3d.coilPlots[2] # Print with new dataset figure2 = plots.plots3d.plot_3d(p3d) figure2.show()