#25 make the plots better#31
Conversation
WalkthroughAdds a new styling module and integrates it across univariate, bivariate, and multivariate plotting. All three plot generators now accept Path-like directories, use pathlib for path construction, return relative string paths, and apply standardized styling. Visual tweaks were made per plot type, and multivariate adds a guard for missing numeric columns. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Caller
participant PlotModule as generate_plots(...)
participant Styling as apply_custom_styling()
participant FS as Filesystem
participant Viz as Matplotlib/Seaborn
Caller->>PlotModule: generate_plots(df, charts_dir, config_params)
Note over PlotModule: New/changed: Path-like handling
PlotModule->>Styling: apply_custom_styling()
Styling-->>PlotModule: rcParams/seaborn configured
PlotModule->>PlotModule: charts_dir_path = Path(charts_dir)
alt For each feature/plot type
PlotModule->>Viz: create plot (titles/labels/colors updated)
Viz-->>PlotModule: Axes/Figure
PlotModule->>FS: savefig(charts_dir_path / "...png")
FS-->>PlotModule: file saved
PlotModule->>PlotModule: collect relative string path
end
Note over PlotModule: Multivariate: guard if no numeric columns → early return
PlotModule-->>Caller: list[str] of relative plot paths
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
🧰 Additional context used🧬 Code graph analysis (3)src/dora/plots/univariate.py (3)
src/dora/plots/bivariate.py (3)
src/dora/plots/multivariate.py (3)
🔇 Additional comments (14)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai help |
ChatThere are 3 ways to chat with CodeRabbit:
CodeRabbit commands
Other keywords and placeholders
CodeRabbit configuration file (
|
This PR aims to improve the plot's aesthetics.
Summary by CodeRabbit
New Features
Style
Refactor