@@ -44,6 +44,7 @@ def layers(self):
4444 for (row , col ), subplot in self .subplots .items ():
4545 layers .extend (subplot .layers )
4646 return list (set (layers ))
47+
4748 def generate_new_rowcol (self , row , col ):
4849 if row is None :
4950 for irow in range (self .nrows ):
@@ -115,21 +116,32 @@ def add_subplot(self, **kwargs):
115116 self .subplots [label ] = line_plot
116117 return line_plot
117118
118- def savefig (self , filename , extension = 'pdf' , backend = "matplotlib" , layers = None , layer_by_layer = False ):
119+ def savefig (
120+ self ,
121+ filename ,
122+ extension = "pdf" ,
123+ backend = "matplotlib" ,
124+ layers = None ,
125+ layer_by_layer = False ,
126+ ):
119127 if backend == "matplotlib" :
120128 if layer_by_layer :
121129 layers = []
122130 for layer in self .layers :
123131 layers .append (layer )
124- fig , axs = self .plot (show = False , backend = "matplotlib" , savefig = True , layers = layers )
132+ fig , axs = self .plot (
133+ show = False , backend = "matplotlib" , savefig = True , layers = layers
134+ )
125135 fig .savefig (f"{ filename } _{ layers } .{ extension } " )
126136 else :
127137 if layers is None :
128138 layers = self .layers
129139 full_filepath = f"{ filename } .{ extension } "
130140 else :
131141 full_filepath = f"{ filename } _{ layers } .{ extension } "
132- fig , axs = self .plot (show = False , backend = "matplotlib" , savefig = True , layers = layers )
142+ fig , axs = self .plot (
143+ show = False , backend = "matplotlib" , savefig = True , layers = layers
144+ )
133145 fig .savefig (full_filepath )
134146
135147 # def add_line(self, label, x_data, y_data, **kwargs):
0 commit comments