Skip to content

Commit 5c47205

Browse files
committed
Improved verbose prints
1 parent fffec01 commit 5c47205

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/maxplotlib/canvas/canvas.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ def show(
304304
elif backend == "plotly":
305305
self.plot_plotly(savefig=False)
306306
elif backend == "tikzpics":
307-
fig = self.plot_tikzpics(savefig=False)
307+
fig = self.plot_tikzpics(savefig=False, verbose=verbose)
308308
fig.show()
309309
else:
310310
raise ValueError("Invalid backend")
@@ -374,8 +374,8 @@ def plot_matplotlib(
374374

375375
def plot_tikzpics(
376376
self,
377-
savefig=None,
378-
verbose=False,
377+
savefig: str | None = None,
378+
verbose: bool = False,
379379
) -> TikzFigure:
380380
if len(self.subplots) > 1:
381381
raise NotImplementedError(

src/maxplotlib/subfigure/line_plot.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,9 @@ def plot_tikzpics(self, layers=None, verbose: bool = False) -> TikzFigure:
235235

236236
nodes = [[xi, yi] for xi, yi in zip(x, y)]
237237
tikz_figure.draw(nodes=nodes, **line["kwargs"])
238+
if verbose:
239+
print("Generated TikZ figure:")
240+
print(tikz_figure.generate_tikz())
238241
return tikz_figure
239242

240243
def plot_plotly(self):

0 commit comments

Comments
 (0)