From bf72274f138933a3075d113536af1ce931ca2883 Mon Sep 17 00:00:00 2001
From: Arin Wongprommoon <arin.wongprommoon@ed.ac.uk>
Date: Thu, 26 May 2022 11:42:20 +0100
Subject: [PATCH] [documentation] Describe design of plotting routines

So that:
- developers can understand the logic and write new routines that
  confirm (or something else otherwise)
- Sphinx documentation displays the description; this helps users
  and developers understand the routines

Addresses https://git.ecdf.ed.ac.uk/swain-lab/aliby/postprocessor/-/merge_requests/10#note_94319
---
 routines/__init__.py | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/routines/__init__.py b/routines/__init__.py
index e69de29b..298e3378 100644
--- a/routines/__init__.py
+++ b/routines/__init__.py
@@ -0,0 +1,23 @@
+"""Routines for analysing post-processed data that don't follow the parameters-processes structure.
+
+Routines for analysing post-processed data that don't follow the
+parameters-processes structure.
+
+Currently, these consist of plotting routines.  There is one module for each
+plotting routine.  Each module consists of two components and is structured as
+follows:
+1. An internal class.
+    The class defines the parameters and defines additional class attributes to
+    help with plotting.  The class also has one method (`plot`) that takes a
+    `matplotlib.Axes` object as an argument.  This method draws the plot on the
+    `Axes` object.
+2. A plotting function.
+    The user accesses this function.  This function defines the default
+    parameters in its arguments.  Within the function, a 'plotter' object is
+    defined using the internal class and then the function draws the plot on a
+    specified `matplotlib.Axes` object.
+
+This structure follows that of plotting routines in `seaborn`
+(https://github.com/mwaskom/seaborn), a Python visualisation library that is
+based on `matplotlib`.
+"""
-- 
GitLab