Closed Marco-Premier closed 2 weeks ago
I made some changes here and also address the failing unit test checks as part of the github workflow. I haven't included save_plot().
def __init__(self, result: AllocationResult):
super().__init__(style="bmh") # Correctly calls parent init
- Using parent's helper methods
def plot_spend_allocation(self) -> plt.Figure: fig, ax = self.create_figure() # Uses parent's figure creation
- Using parent's color scheme
color=self.colors["positive"] # Uses parent's color definitions color=self.colors["negative"] color=self.colors["current"]
- Using parent's styling constants:
fontsize=self.font_sizes["annotation"] alpha=self.alpha["primary"]
- Cleanup inheritance:
def cleanup(self) -> None: super().cleanup() # Calls parent's cleanup
Project Robyn
Type of change
allocator_visualizer.py
(now renamed intoallocator_visualizer_original.py
) with a generated version from markdown.allocator_plotter.py