diff --git a/gillespy2/__version__.py b/gillespy2/__version__.py index 2bb83d52b..e38d7bc98 100644 --- a/gillespy2/__version__.py +++ b/gillespy2/__version__.py @@ -5,7 +5,7 @@ # @website https://github.com/GillesPy2/GillesPy2 # ============================================================================= -__version__ = '1.5.3' +__version__ = '1.5.4' __title__ = 'GillesPy2' __description__ = 'Python interface for Gillespie-style biochemical simulations' __url__ = 'https://github.com/GillesPy2/GillesPy2' diff --git a/gillespy2/core/model.py b/gillespy2/core/model.py index f45cfd22b..aa5719e7d 100644 --- a/gillespy2/core/model.py +++ b/gillespy2/core/model.py @@ -1114,6 +1114,7 @@ def to_model(self, name): raise InvalidStochMLError( "Found a customized propensity function, but no expression was given. {}".format(e)) reaction.propensity_function = propfunc + reaction.ode_propensity_function = propfunc else: raise InvalidStochMLError( "Unsupported or no reaction type given for reaction" + name) diff --git a/gillespy2/core/results.py b/gillespy2/core/results.py index 95202094c..810b5f0dd 100644 --- a/gillespy2/core/results.py +++ b/gillespy2/core/results.py @@ -42,7 +42,7 @@ def _plotplotly_iterate(trajectory, show_labels=True, trace_list=None, line_dict import plotly.graph_objs as go - for i,species in enumerate(trajectory.data): + for i, species in enumerate(trajectory.data): if species != 'time': if species not in included_species_list and included_species_list: @@ -61,7 +61,8 @@ def _plotplotly_iterate(trajectory, show_labels=True, trace_list=None, line_dict y=trajectory.data[species], mode='lines', name=species, - line = line_dict + line=line_dict, + legendgroup=species ) ) else: @@ -72,6 +73,7 @@ def _plotplotly_iterate(trajectory, show_labels=True, trace_list=None, line_dict mode='lines', name=species, line=line_dict, + legendgroup=species, showlegend=False ) ) @@ -432,6 +434,7 @@ def plotplotly(self, index=None, xaxis_label="Time ", yaxis_label="Species Popul trace_list = _plotplotly_iterate(trajectory, trace_list=trace_list, included_species_list= included_species_list) + layout = go.Layout( showlegend=show_legend, title=title,