@@ -982,7 +982,11 @@ def _make_plot_cumulative_histogram(
982
982
return fig , ax
983
983
984
984
def make_plot (
985
- self , catalogue : VelociraptorCatalogue , directory : str , file_extension : str
985
+ self ,
986
+ catalogue : VelociraptorCatalogue ,
987
+ directory : str ,
988
+ file_extension : str ,
989
+ no_plot : bool = False ,
986
990
):
987
991
"""
988
992
Federates out data parsing to individual functions based on the
@@ -1042,7 +1046,8 @@ def make_plot(
1042
1046
if self .y_label_override is not None :
1043
1047
self .y_label = self .y_label_override
1044
1048
1045
- fig .savefig (f"{ directory } /{ self .filename } .{ file_extension } " )
1049
+ if not no_plot :
1050
+ fig .savefig (f"{ directory } /{ self .filename } .{ file_extension } " )
1046
1051
1047
1052
# Delete the figure to cut down on memory consumption.
1048
1053
close (fig )
@@ -1161,7 +1166,11 @@ def link_catalogue(
1161
1166
return
1162
1167
1163
1168
def create_plots (
1164
- self , directory : str , file_extension : str = "pdf" , debug : bool = False
1169
+ self ,
1170
+ directory : str ,
1171
+ file_extension : str = "pdf" ,
1172
+ debug : bool = False ,
1173
+ no_plots : bool = False ,
1165
1174
):
1166
1175
"""
1167
1176
Creates and saves the plots in a directory.
@@ -1182,6 +1191,7 @@ def create_plots(
1182
1191
catalogue = self .catalogue ,
1183
1192
directory = directory ,
1184
1193
file_extension = file_extension ,
1194
+ no_plot = no_plots ,
1185
1195
)
1186
1196
self .created_successfully .append (True )
1187
1197
except (AttributeError , ValueError ) as e :
0 commit comments