mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 13:15:39 -04:00
Made upper bound for random colors 256 per comments by @paulromano
This commit is contained in:
parent
59f9b77333
commit
4d3c97f698
1 changed files with 7 additions and 7 deletions
|
|
@ -267,8 +267,8 @@ class Plot(object):
|
|||
This routine may be used to generate random, reproducible color schemes.
|
||||
The colors generated are based upon cell/material IDs in the geometry.
|
||||
|
||||
Params
|
||||
------
|
||||
Parameters
|
||||
----------
|
||||
geometry : openmc.Geometry
|
||||
The geometry for which the plot is created
|
||||
seed : Integral
|
||||
|
|
@ -292,9 +292,9 @@ class Plot(object):
|
|||
# Generate random colors for each feature
|
||||
self.col_spec = {}
|
||||
for domain in domains:
|
||||
r = np.random.randint(0, 255)
|
||||
g = np.random.randint(0, 255)
|
||||
b = np.random.randint(0, 255)
|
||||
r = np.random.randint(0, 256)
|
||||
g = np.random.randint(0, 256)
|
||||
b = np.random.randint(0, 256)
|
||||
self.col_spec[domain] = (r, g, b)
|
||||
|
||||
|
||||
|
|
@ -393,8 +393,8 @@ class PlotsFile(object):
|
|||
The colors generated are based upon cell/material IDs in the geometry.
|
||||
The color schemes will be consistent for all plots in "plots.xml".
|
||||
|
||||
Params
|
||||
------
|
||||
Parameters
|
||||
----------
|
||||
geometry : openmc.Geometry
|
||||
The geometry for which the plots are defined
|
||||
seed : Integral
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue