def plot_trajectory_with_matplotlib(<EOL>obs, max_count=<NUM_LIT:10>, figsize=<NUM_LIT:6>, legend=True, angle=None,<EOL>wireframe=False, grid=True, noaxis=False, plot_range=None, **kwargs):
import matplotlib.pyplot as plt<EOL>data = obs.data()<EOL>if max_count is not None and len(data) > max_count:<EOL><INDENT>data = random.sample(data, max_count)<EOL><DEDENT>fig, ax = __prepare_mplot3d_with_matplotlib(<EOL>__get_range_of_trajectories(data, plot_range),<EOL>figsize, grid, wireframe, angle, noaxis)<EOL>lines = []<EOL>for i, y in enumerate(data):<EOL><INDENT>xarr, yarr, zarr = [], [], []<EOL>for pos in y:<EOL><INDENT>xarr.append(pos[<NUM_LIT:0>])<EOL>yarr.append(pos[<NUM_LIT:1>])<EOL>zarr.append(pos[<NUM_LIT:2>])<EOL><DEDENT>lines.append((xarr, yarr, zarr))<EOL><DEDENT>__plot_trajectory_with_matplotlib(lines, ax, **kwargs)<EOL>if legend is not None and legend is not False:<EOL><INDENT>legend_opts = {"<STR_LIT>": "<STR_LIT>", "<STR_LIT>": True}<EOL>if isinstance(legend, dict):<EOL><INDENT>legend_opts.update(legend)<EOL><DEDENT>ax.legend(**legend_opts)<EOL><DEDENT>plt.show()<EOL>
Generate a plot from received instance of TrajectoryObserver and show it
on IPython notebook.

Parameters
----------
obs : TrajectoryObserver
    TrajectoryObserver to render.
max_count : Integer, default 10
    The maximum number of particles to show. If None, show all.
figsize : float, default 6
    Size of the plotting area. Given in inch.
angle : tuple, default None
    A tuple of view angle which is given as (azim, elev, dist).
    If None, use default assumed to be (-60, 30, 10).
legend : bool, default True
plot_range : tuple, default None
    Range for plotting. A triplet of pairs suggesting (rangex, rangey, rangez).
    If None, the minimum volume containing all the trajectories is used.