diff --git a/docs/conf.py b/docs/conf.py index b3ef995..9c4dded 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -23,6 +23,7 @@ "sphinx.ext.napoleon", "sphinxawesome_theme", "sphinx_togglebutton", + "sphinxcontrib.video", ] html_title = project templates_path = ["_templates"] diff --git a/docs/how_to_use.rst b/docs/how_to_use.rst index 5a6ac22..c622ac9 100644 --- a/docs/how_to_use.rst +++ b/docs/how_to_use.rst @@ -20,11 +20,9 @@ The main function of ``mapflow`` is ``animate``, which creates a video from an ` ds = xr.tutorial.open_dataset("era5-2mt-2019-03-uk.grib") animate(da=ds['t2m'].isel(time=slice(120)), path='animation.mp4') -.. raw:: html - - +.. video:: ../_static/animation.mp4 + :width: 640 + :height: 480 Creating a static plot ---------------------- diff --git a/docs/requirements.txt b/docs/requirements.txt index f34846c..f3687ac 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -4,4 +4,5 @@ sphinx-togglebutton xarray matplotlib geopandas -tqdm \ No newline at end of file +tqdm +sphinxcontrib-video \ No newline at end of file