Repository: openmc-dev/openmc

Issue:
`Universe.plot` seed does not change color behavior.
## Bug Description
I noticed today that setting the `seed` parameter when calling `Universe.plot` doesn't affect the colors in a plot.

## Steps to Reproduce
Run the following in a notebook for the assembly model located at `examples/assembly` in the repo.

<img width="1067" alt="Screenshot 2023-08-13 at 2 57 47 PM" src="https://github.com/openmc-dev/openmc/assets/4563941/06afb0a2-7d19-43e2-8d3b-4c6470a15c1c">


Discussion:

Resolving patch:
diff --git a/openmc/settings.py b/openmc/settings.py
--- a/openmc/settings.py
+++ b/openmc/settings.py
@@ -133,6 +133,8 @@ class Settings:
         Number of particles per generation
     photon_transport : bool
         Whether to use photon transport.
+    plot_seed : int
+       Initial seed for randomly generated plot colors.
     ptables : bool
         Determine whether probability tables are used.
     resonance_scattering : dict
@@ -270,6 +272,7 @@ def __init__(self, **kwargs):
         self._confidence_intervals = None
         self._electron_treatment = None
         self._photon_transport = None
+        self._plot_seed = None
         self._ptables = None
         self._seed = None
         self._survival_biasing = None
@@ -504,6 +507,16 @@ def photon_transport(self, photon_transport: bool):
         cv.check_type('photon transport', photon_transport, bool)
         self._photon_transport = photon_transport
 
+    @property
+    def plot_seed(self):
+        return self._plot_seed
+
+    @plot_seed.setter
+    def plot_seed(self, seed):
+        cv.check_type('random plot color seed', seed, Integral)
+        cv.check_greater_than('random plot color seed', seed, 0)
+        self._plot_seed = seed
+
     @property
     def seed(self) -> int:
         return self._seed
@@ -1118,6 +1131,11 @@ def _create_photon_transport_subelement(self, root):
             element = ET.SubElement(root, "photon_transport")
             element.text = str(self._photon_transport).lower()
 
+    def _create_plot_seed_subelement(self, root):
+        if self._plot_seed is not None:
+            element = ET.SubElement(root, "plot_seed")
+            element.text = str(self._plot_seed)
+
     def _create_ptables_subelement(self, root):
         if self._ptables is not None:
             element = ET.SubElement(root, "ptables")
@@ -1491,6 +1509,11 @@ def _photon_transport_from_xml_element(self, root):
         if text is not None:
             self.photon_transport = text in ('true', '1')
 
+    def _plot_seed_from_xml_element(self, root):
+        text = get_text(root, 'plot_seed')
+        if text is not None:
+            self.plot_seed = int(text)
+
     def _ptables_from_xml_element(self, root):
         text = get_text(root, 'ptables')
         if text is not None:
@@ -1706,6 +1729,7 @@ def to_xml_element(self, mesh_memo=None):
         self._create_energy_mode_subelement(element)
         self._create_max_order_subelement(element)
         self._create_photon_transport_subelement(element)
+        self._create_plot_seed_subelement(element)
         self._create_ptables_subelement(element)
         self._create_seed_subelement(element)
         self._create_survival_biasing_subelement(element)
@@ -1802,6 +1826,7 @@ def from_xml_element(cls, elem, meshes=None):
         settings._energy_mode_from_xml_element(elem)
         settings._max_order_from_xml_element(elem)
         settings._photon_transport_from_xml_element(elem)
+        settings._plot_seed_from_xml_element(elem)
         settings._ptables_from_xml_element(elem)
         settings._seed_from_xml_element(elem)
         settings._survival_biasing_from_xml_element(elem)
diff --git a/openmc/universe.py b/openmc/universe.py
--- a/openmc/universe.py
+++ b/openmc/universe.py
@@ -423,7 +423,7 @@ def plot(self, origin=None, width=None, pixels=40000,
             model = openmc.Model()
             model.geometry = openmc.Geometry(self)
             if seed is not None:
-                model.settings.seed = seed
+                model.settings.plot_seed = seed
 
             # Determine whether any materials contains macroscopic data and if
             # so, set energy mode accordingly


Test patch:
diff --git a/tests/unit_tests/test_settings.py b/tests/unit_tests/test_settings.py
--- a/tests/unit_tests/test_settings.py
+++ b/tests/unit_tests/test_settings.py
@@ -23,6 +23,7 @@ def test_export_to_xml(run_in_tmpdir):
     s.surf_source_write = {'surface_ids': [2], 'max_particles': 200}
     s.confidence_intervals = True
     s.ptables = True
+    s.plot_seed = 100
     s.survival_biasing = True
     s.cutoff = {'weight': 0.25, 'weight_avg': 0.5, 'energy_neutron': 1.0e-5,
                 'energy_photon': 1000.0, 'energy_electron': 1.0e-5,
@@ -82,6 +83,7 @@ def test_export_to_xml(run_in_tmpdir):
     assert s.surf_source_write == {'surface_ids': [2], 'max_particles': 200}
     assert s.confidence_intervals
     assert s.ptables
+    assert s.plot_seed == 100
     assert s.seed == 17
     assert s.survival_biasing
     assert s.cutoff == {'weight': 0.25, 'weight_avg': 0.5,
@@ -108,7 +110,7 @@ def test_export_to_xml(run_in_tmpdir):
                                       'energy_min': 1.0, 'energy_max': 1000.0,
                                       'nuclides': ['U235', 'U238', 'Pu239']}
     assert s.create_fission_neutrons
-    assert not s.create_delayed_neutrons 
+    assert not s.create_delayed_neutrons
     assert s.log_grid_bins == 2000
     assert not s.photon_transport
     assert s.electron_treatment == 'led'