.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "generated/gallery/visualisation/plotting_ripple_image_series.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_generated_gallery_visualisation_plotting_ripple_image_series.py: ============================= Plotting a RippleImageSeries ============================= A RippleImageSeries is simply a container class for a list of RippleImages. This example demonstrates how to plot a RippleImageSeries using inbuilt plotting methods. .. GENERATED FROM PYTHON SOURCE LINES 10-19 .. code-block:: Python from matplotlib import pyplot as plt from ripplemapper.analyse import (add_a_star_contours, add_boundary_contours, add_chan_vese_contours) from ripplemapper.classes import RippleImageSeries from ripplemapper.data.example import example_dir from ripplemapper.io import load_dir_to_obj .. GENERATED FROM PYTHON SOURCE LINES 20-24 We can create a list of RippleImages from a list of image files. In this example we use the load_dir_to_obj method to load all images in a directory into RippleImage objects. Passing this list to the RippleImageSeries constructor will create a RippleImageSeries object. .. GENERATED FROM PYTHON SOURCE LINES 25-32 .. code-block:: Python ripple_images = load_dir_to_obj(example_dir) series = RippleImageSeries(ripple_images) add_boundary_contours(series, sigma=2) add_a_star_contours(series) add_chan_vese_contours(series) .. GENERATED FROM PYTHON SOURCE LINES 33-37 We can produce an animation with the `RippleImageSeries.animate` method. Passing a file name to the method will save the animation to a file. Disable the plotting of ripple contours by setting `include_contours=False`. .. GENERATED FROM PYTHON SOURCE LINES 38-41 .. code-block:: Python animation = series.animate() plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 5.215 seconds) .. _sphx_glr_download_generated_gallery_visualisation_plotting_ripple_image_series.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plotting_ripple_image_series.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plotting_ripple_image_series.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plotting_ripple_image_series.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_