@@ -42,6 +42,7 @@ class DisplayPreferences:
4242 tooltips_full_results: False
4343 graphviz_html_height: {'big-system': ('600px', '900px'), 'huge-system': ('800px', '1200px'), 'system': ('400px', '600px'), 'unit': ('225px', '400px')}
4444 show_all_streams: True
45+ ID_inference: False
4546 flow: 'kmol/hr:.3g'
4647 T: 'K:.5g'
4748 P: 'Pa:.6g'
@@ -55,7 +56,7 @@ class DisplayPreferences:
5556 'label_color' , 'label_color' , 'depth_colors' , 'stream_width' ,
5657 'unit_color' , 'unit_label_color' , 'unit_periphery_color' ,
5758 'fill_cluster' , 'graphviz_format' , 'tooltips_full_results' ,
58- 'graphviz_html_height' , 'show_all_streams' )
59+ 'graphviz_html_height' , 'show_all_streams' , 'ID_inference' )
5960
6061 def __init__ (self ):
6162 #: Whether to label the ID of streams with sources and sinks in process
@@ -80,16 +81,16 @@ def __init__(self):
8081 self .raise_exception : bool = False
8182
8283 #: Background color in graphviz diagrams.
83- self .background_color : str = 'transparent '
84+ self .background_color : str = '#000000 '
8485
8586 #: Color of streams in graphviz diagrams.
86- self .stream_color : str = '#90918e '
87+ self .stream_color : str = '#98a2ad '
8788
8889 #: Color of stream labels in graphviz diagrams.
89- self .label_color : str = '#90918e '
90+ self .label_color : str = '#e5e5e5 '
9091
9192 #: Color of subsystem clusters in BioSTEAM graphviz diagrams.
92- self .depth_colors : list [str ] = ['#f98f609f ' ]
93+ self .depth_colors : list [str ] = ['#5172512f' , '#1111112f ' ]
9394
9495 #: Property to scale stream widths in BioSTEAM graphviz diagrams.
9596 self .stream_width : str = 'F_mass'
@@ -101,7 +102,7 @@ def __init__(self):
101102 self .unit_label_color : str = 'white'
102103
103104 #: Unit node periphery color in BioSTEAM graphviz diagrams.
104- self .unit_periphery_color : str = '#90918e '
105+ self .unit_periphery_color : str = 'none '
105106
106107 #: Whether to fill subsystem boxes in BioSTEAM 'cluster' diagrams.
107108 self .fill_cluster : bool = False
@@ -123,6 +124,9 @@ def __init__(self):
123124 #: Whether to show all streams, including empty feeds and products.
124125 self .show_all_streams = True
125126
127+ #: Whether to infer ID of unit operations, streams, and systems by variable name.
128+ self .ID_inference = True
129+
126130 def temporary (self ):
127131 """Return a TemporaryPreferences object that will revert back to original
128132 preferences after context management."""
@@ -217,22 +221,7 @@ def _set_mode(self, stream, label, bg, cluster, unit_color,
217221 self .fill_cluster = fill_cluster
218222 if save : self .save ()
219223
220- def classic_mode (self ,
221- stream = '#90918e' ,
222- label = '#90918e' ,
223- bg = 'transparent' ,
224- cluster = ('#f98f609f' ,),
225- unit_color = '#555f69' ,
226- unit_label_color = 'white' ,
227- unit_periphery_color = 'none' ,
228- fill_cluster = False ,
229- save = False ):
230- """Set diagram display colors to classic mode."""
231- self ._set_mode (stream , label , bg , cluster , unit_color ,
232- unit_label_color , unit_periphery_color ,
233- fill_cluster , save )
234-
235- def dark_mode (self , stream = '#98a2ad' , label = '#e5e5e5' , bg = 'transparent' ,
224+ def dark_mode (self , stream = '#98a2ad' , label = '#e5e5e5' , bg = '#000000' ,
236225 cluster = ['#5172512f' , '#1111112f' ], unit_color = '#555f69' ,
237226 unit_label_color = 'white' , unit_periphery_color = 'none' ,
238227 fill_cluster = True , save = False ):
@@ -268,7 +257,6 @@ def to_dict(self):
268257 dct ['composition' ] = self .composition
269258 dct ['N' ] = self .N
270259 dct ['sort' ] = self .sort
271-
272260 return dct
273261
274262 def save (self ):
0 commit comments