File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 88from perplex_utils import pretty_plot_phase_diagram
99
1010import matplotlib .pyplot as plt
11+ import pickle
1112
1213
1314def run_perplex (
@@ -266,13 +267,20 @@ def run_perplex(
266267 mask_polygon = mask_polygon ,
267268 )
268269
269- with open (f"{ project_name } _field_ids.txt" , "w" ) as f :
270+ # Save the assemblage data for all the small fields
271+ with open (f"{ project_name } _phase_diagram_field_ids.txt" , "w" ) as f :
270272 for i , small_field in enumerate (small_fields ):
271273 line = f"{ i + 1 } : { small_field } "
272274 print (line )
273275 f .write (f"{ line } \n " )
274276
275- fig .savefig (f"{ project_name } .pdf" )
277+ # Save figure as a pdf
278+ fig .savefig (f"{ project_name } _phase_diagram.pdf" )
279+
280+ # Save figure as a pickle file to reload later
281+ with open (f"{ project_name } _phase_diagram.pkl" , "wb" ) as f :
282+ pickle .dump (fig , f )
283+
276284 plt .show ()
277285
278286 print ("Processing complete." )
You can’t perform that action at this time.
0 commit comments