Plotter

Bases: ABC

Abstract plotting interface for rendering data from processors.

Overview

Specifies the minimal lifecycle for a plot: prepare with processors and options, then draw.

  • Abstract methods: ready_plot(processors, options) and draw_plot().
  • Intended to separate data preparation from rendering.
Usage Notes

Implementations should be lightweight and accept a DataProcessor instance.

Source code in contracts\plotter.py
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
class Plotter(ABC):
    """
        Abstract plotting interface for rendering data from processors.

        Overview:
            Specifies the minimal lifecycle for a plot: prepare with processors
            and options, then draw.

        - Abstract methods: ready_plot(processors, options) and draw_plot().
        - Intended to separate data preparation from rendering.

        Usage Notes:
            Implementations should be lightweight and accept a DataProcessor instance.
    """
    @abstractmethod
    def ready_plot(self, processors: DataProcessor, options: dict):
        pass

    @abstractmethod
    def draw_plot(self):
        pass