mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Allow color names, rename Plot attributes, add openmc.plot_inline()
This commit is contained in:
parent
24cd12cf3a
commit
3913d55e2c
28 changed files with 219 additions and 190 deletions
|
|
@ -471,7 +471,7 @@ class InputSet(object):
|
|||
plot.origin = (125, 125, 0)
|
||||
plot.width = (250, 250)
|
||||
plot.pixels = (3000, 3000)
|
||||
plot.color = 'mat'
|
||||
plot.color_by = 'material'
|
||||
|
||||
self.plots.add_plot(plot)
|
||||
|
||||
|
|
@ -563,7 +563,7 @@ class PinCellInputSet(object):
|
|||
plot.origin = (0.0, 0.0, 0)
|
||||
plot.width = (1.26, 1.26)
|
||||
plot.pixels = (300, 300)
|
||||
plot.color = 'mat'
|
||||
plot.color_by = 'material'
|
||||
|
||||
self.plots.add_plot(plot)
|
||||
|
||||
|
|
@ -714,7 +714,7 @@ class AssemblyInputSet(object):
|
|||
plot.origin = (0.0, 0.0, 0)
|
||||
plot.width = (21.42, 21.42)
|
||||
plot.pixels = (300, 300)
|
||||
plot.color = 'mat'
|
||||
plot.color_by = 'material'
|
||||
|
||||
self.plots.add_plot(plot)
|
||||
|
||||
|
|
@ -793,6 +793,6 @@ class MGInputSet(InputSet):
|
|||
plot.width = (2.5, 2.5)
|
||||
plot.basis = 'xz'
|
||||
plot.pixels = (3000, 3000)
|
||||
plot.color = 'mat'
|
||||
plot.color_by = 'material'
|
||||
|
||||
self.plots.add_plot(plot)
|
||||
|
|
|
|||
|
|
@ -52,12 +52,12 @@
|
|||
</settings>
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<plots>
|
||||
<plot basis="xy" color="cell" filename="cellplot" id="1" type="slice">
|
||||
<plot basis="xy" color_by="cell" filename="cellplot" id="1" type="slice">
|
||||
<origin>0 0 0</origin>
|
||||
<width>7 7</width>
|
||||
<pixels>400 400</pixels>
|
||||
</plot>
|
||||
<plot basis="xy" color="mat" filename="matplot" id="2" type="slice">
|
||||
<plot basis="xy" color_by="material" filename="matplot" id="2" type="slice">
|
||||
<origin>0 0 0</origin>
|
||||
<width>7 7</width>
|
||||
<pixels>400 400</pixels>
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ class DistribmatTestHarness(PyAPITestHarness):
|
|||
|
||||
plot = openmc.Plot(plot_id=1)
|
||||
plot.basis = 'xy'
|
||||
plot.color = 'cell'
|
||||
plot.color_by = 'cell'
|
||||
plot.filename = 'cellplot'
|
||||
plot.origin = (0, 0, 0)
|
||||
plot.width = (7, 7)
|
||||
|
|
@ -104,7 +104,7 @@ class DistribmatTestHarness(PyAPITestHarness):
|
|||
|
||||
plot = openmc.Plot(plot_id=2)
|
||||
plot.basis = 'xy'
|
||||
plot.color = 'mat'
|
||||
plot.color_by = 'material'
|
||||
plot.filename = 'matplot'
|
||||
plot.origin = (0, 0, 0)
|
||||
plot.width = (7, 7)
|
||||
|
|
|
|||
|
|
@ -1,28 +1,28 @@
|
|||
<?xml version="1.0"?>
|
||||
<plots>
|
||||
|
||||
<plot id="1" type="slice" basis="xy" color="cell">
|
||||
<plot id="1" type="slice" basis="xy" color_by="cell">
|
||||
<filename>xy_cell</filename>
|
||||
<origin>0 0 0</origin>
|
||||
<width>30 30</width>
|
||||
<pixels>500 500</pixels>
|
||||
</plot>
|
||||
|
||||
<plot id="2" type="slice" basis="xy" color="material">
|
||||
<plot id="2" type="slice" basis="xy" color_by="material">
|
||||
<filename>xy_material</filename>
|
||||
<origin>0 0 0</origin>
|
||||
<width>30 30</width>
|
||||
<pixels>500 500</pixels>
|
||||
</plot>
|
||||
|
||||
<plot id="3" type="slice" basis="yz" color="cell">
|
||||
<plot id="3" type="slice" basis="yz" color_by="cell">
|
||||
<filename>yz_cell</filename>
|
||||
<origin>0 0 0</origin>
|
||||
<width>50 400</width>
|
||||
<pixels>500 4000</pixels>
|
||||
</plot>
|
||||
|
||||
<plot id="4" type="slice" basis="yz" color="material">
|
||||
<plot id="4" type="slice" basis="yz" color_by="material">
|
||||
<filename>yz_material</filename>
|
||||
<origin>0 0 0</origin>
|
||||
<width>5 5</width>
|
||||
|
|
|
|||
|
|
@ -1,28 +1,28 @@
|
|||
<?xml version="1.0"?>
|
||||
<plots>
|
||||
|
||||
<plot id="1" type="slice" basis="xy" color="cell">
|
||||
<plot id="1" type="slice" basis="xy" color_by="cell">
|
||||
<filename>xy_cell</filename>
|
||||
<origin>0 0 0</origin>
|
||||
<width>30 30</width>
|
||||
<pixels>500 500</pixels>
|
||||
</plot>
|
||||
|
||||
<plot id="2" type="slice" basis="xy" color="material">
|
||||
<plot id="2" type="slice" basis="xy" color_by="material">
|
||||
<filename>xy_material</filename>
|
||||
<origin>0 0 0</origin>
|
||||
<width>30 30</width>
|
||||
<pixels>500 500</pixels>
|
||||
</plot>
|
||||
|
||||
<plot id="3" type="slice" basis="yz" color="cell">
|
||||
<plot id="3" type="slice" basis="yz" color_by="cell">
|
||||
<filename>yz_cell</filename>
|
||||
<origin>0 0 0</origin>
|
||||
<width>50 400</width>
|
||||
<pixels>500 4000</pixels>
|
||||
</plot>
|
||||
|
||||
<plot id="4" type="slice" basis="yz" color="material">
|
||||
<plot id="4" type="slice" basis="yz" color_by="material">
|
||||
<filename>yz_material</filename>
|
||||
<origin>0 0 0</origin>
|
||||
<width>5 5</width>
|
||||
|
|
|
|||
|
|
@ -51,12 +51,12 @@
|
|||
</settings>
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<plots>
|
||||
<plot basis="xy" color="cell" filename="cellplot" id="1" type="slice">
|
||||
<plot basis="xy" color_by="cell" filename="cellplot" id="1" type="slice">
|
||||
<origin>0 0 0</origin>
|
||||
<width>7 7</width>
|
||||
<pixels>400 400</pixels>
|
||||
</plot>
|
||||
<plot basis="xy" color="mat" filename="matplot" id="2" type="slice">
|
||||
<plot basis="xy" color_by="material" filename="matplot" id="2" type="slice">
|
||||
<origin>0 0 0</origin>
|
||||
<width>7 7</width>
|
||||
<pixels>400 400</pixels>
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ class MultipoleTestHarness(PyAPITestHarness):
|
|||
|
||||
plot = openmc.Plot(plot_id=1)
|
||||
plot.basis = 'xy'
|
||||
plot.color = 'cell'
|
||||
plot.color_by = 'cell'
|
||||
plot.filename = 'cellplot'
|
||||
plot.origin = (0, 0, 0)
|
||||
plot.width = (7, 7)
|
||||
|
|
@ -88,7 +88,7 @@ class MultipoleTestHarness(PyAPITestHarness):
|
|||
|
||||
plot = openmc.Plot(plot_id=2)
|
||||
plot.basis = 'xy'
|
||||
plot.color = 'mat'
|
||||
plot.color_by = 'material'
|
||||
plot.filename = 'matplot'
|
||||
plot.origin = (0, 0, 0)
|
||||
plot.width = (7, 7)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<origin>0. 0. 0.</origin>
|
||||
<width>25 25</width>
|
||||
<pixels>200 200</pixels>
|
||||
<col_spec id="1" rgb="255 0 0" /> <!-- Red -->
|
||||
<color id="1" rgb="255 0 0" /> <!-- Red -->
|
||||
<meshlines meshtype="entropy" linewidth="0" />
|
||||
</plot>
|
||||
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
<mask components="1 3" background="255 255 255" />
|
||||
</plot>
|
||||
|
||||
<plot id="3" basis="yz" color="mat">
|
||||
<plot id="3" basis="yz" color_by="material">
|
||||
<origin>0. 0. 0.</origin>
|
||||
<width>25 25</width>
|
||||
<pixels>200 200</pixels>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<plots>
|
||||
<plot id="1" type="slice" basis="xy" color="material"
|
||||
<plot id="1" type="slice" basis="xy" color_by="material"
|
||||
origin="0.0 0.0 0.0" width="1.0 1.0" pixels="400 400">
|
||||
</plot>
|
||||
</plots>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue