Plotting trajectories#

[2]:
%load_ext autoreload
%autoreload 2

from tdm.analysis import Analysis
from tdm.plot.two_cells import plot_phase_portrait, plot_trajectory

import numpy as np
import matplotlib.pyplot as plt

ana = Analysis.load("fm.pkl")
The autoreload extension is already loaded. To reload it, use:
  %reload_ext autoreload
[3]:
plot_phase_portrait(ana, plot_nullclines=False)
../../../_images/notebooks_examples_two_cell_plots_trajectory_2_0.png
[4]:

fig, ax = plt.subplots(figsize=(4,4)) plot_phase_portrait(ana, ax=ax, plot_nullclines=False) ode_timepoints = np.linspace(0,3000,2000) plot_trajectory(ana, state0=(0.1,0.1), odeint_timepoints=ode_timepoints, arrow_timepoint_idxs=[], ax=ax, color='red') plot_trajectory(ana, state0=(2,6), odeint_timepoints=ode_timepoints, arrow_timepoint_idxs=[], ax=ax, color='blue') plot_trajectory(ana, state0=(0,0.1), odeint_timepoints=ode_timepoints, arrow_timepoint_idxs=[], ax=ax, color='pink') plot_trajectory(ana, state0=(0.1,0), odeint_timepoints=ode_timepoints, arrow_timepoint_idxs=[], ax=ax, color='green')
../../../_images/notebooks_examples_two_cell_plots_trajectory_3_0.png