In [1]:
from dagmc_slice_tool import dagmc_slicer
In [2]:
slicer = dagmc_slicer(filename = "teapot_grps_zip.h5m")
In [3]:
print slicer.axis #axis for the slice (default)
print slicer.coord #coordinate on which to slice for the slicer.axis (default is 0.0)
print slicer.by_group #indicates whether the plot will be done by tally/material group or not
print slicer.filename #filename to be sliced
In [4]:
slicer.create_slice()
In [5]:
slicer.show_slice() #check boxes for fill and visibility only apply to a model with groups (example to come)
In [6]:
slicer.axis = 2 #the slicer's axis can be changed directly, but the slice will need to be regenerated (or now)
slicer.create_slice()
In [7]:
slicer.show_slice()
In [8]:
slicer.figure #matplotlib figure and axes can be accessed as attributes of the slicer
slicer.plt_ax
Out[8]:
In [9]:
slicer.by_group = True #slicer setting for groups can be set directly or on file open
In [10]:
#but they can also be set upon creation
slicer = dagmc_slicer( filename = "teapot_grps_zip.h5m", axis = 2, coordinate = 0.0, by_group = True)
In [11]:
slicer.create_slice()
In [13]:
slicer.show_slice()
#groups can now be selected in the legend of the plot to set their fill and visibility
#the legend will reflect the state of each group
In [ ]: