Skip to content

Commit e5092c8

Browse files
committed
Allow plotting and then saving
1 parent 1b50734 commit e5092c8

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/maxplotlib/canvas/canvas.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,15 +147,15 @@ def savefig(
147147
full_filepath = filename
148148
else:
149149
full_filepath = f"{filename_no_extension}_{layers}.{extension}"
150-
print(f"Save to {full_filepath}")
150+
# print(f"Save to {full_filepath}")
151151
if self._plotted:
152152
self._matplotlib_fig.savefig(full_filepath)
153153
else:
154-
154+
155155
fig, axs = self.plot(
156156
show=False, backend="matplotlib", savefig=True, layers=layers
157157
)
158-
print('done plotting')
158+
# print('done plotting')
159159
fig.savefig(full_filepath)
160160
if verbose:
161161
print(f"Saved {full_filepath}")
@@ -174,7 +174,6 @@ def plot_matplotlib(self, show=True, savefig=False, layers=None, usetex=False):
174174
filename (str, optional): Filename to save the figure.
175175
show (bool): Whether to display the plot.
176176
"""
177-
print(f"Plotting with maxplotlib ")
178177
tex_fonts = plt_utils.setup_tex_fonts(fontsize=self.fontsize, usetex=usetex)
179178

180179
plt_utils.setup_plotstyle(
@@ -206,7 +205,6 @@ def plot_matplotlib(self, show=True, savefig=False, layers=None, usetex=False):
206205

207206
for (row, col), subplot in self.subplots.items():
208207
ax = axes[row][col]
209-
print(f"subplot.plot_matplotlib(ax, layers=layers)")
210208
subplot.plot_matplotlib(ax, layers=layers)
211209
# ax.set_title(f"Subplot ({row}, {col})")
212210
ax.grid()

0 commit comments

Comments
 (0)