From b49b8a57f11820b2a2f79fa369a12da54596b4b6 Mon Sep 17 00:00:00 2001 From: Yalin Date: Sat, 14 Oct 2023 11:17:19 -0400 Subject: [PATCH] mute auto-figure generation during kinetic reaction testing --- qsdsan/processes/_kinetic_reaction.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qsdsan/processes/_kinetic_reaction.py b/qsdsan/processes/_kinetic_reaction.py index 565d2da2..708804fc 100644 --- a/qsdsan/processes/_kinetic_reaction.py +++ b/qsdsan/processes/_kinetic_reaction.py @@ -118,8 +118,9 @@ class KineticReaction(Rxn): 0.037578/2.7183**(2.2e-5*t) >>> round(rxn.half_life, 2) 31506.69 - >>> # You can also look at the conversion over time - >>> fig = rxn.plot_conversion_over_time() + >>> # You can also look at the conversion over time, + >>> # set `show` to "True" or use fig.show() to see the figure + >>> fig = rxn.plot_conversion_over_time(show=False) References ---------- @@ -183,7 +184,8 @@ def plot_conversion_over_time(self, **kwargs): All keyword arguments will be passed to :func:`sympy.plot`. ''' ylabel = kwargs.pop('ylabel', 'Conversion') - plot(self._X_t, (self._t_sym, 0, self.t), ylabel=ylabel) + fig = plot(self._X_t, (self._t_sym, 0, self.t), ylabel=ylabel, **kwargs) + return fig @property def rate_reactant(self):