Refactor plot_model_estimates functions to extract shared plotting logic #179
+791
−837
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
plot_model_estimatesandplot_model_estimates!functions contained ~711 lines of duplicated plotting code. This refactoring extracts the common logic into a shared helper function following the pattern established byplot_solution.Changes
Added
_plot_model_estimates_from_containerhelper function (637 lines)_generate_single_model_estimate_plots- handles single estimation plots_generate_comparison_model_estimate_plots- handles comparison plots with annotationsSimplified
plot_model_estimatesandplot_model_estimates!Before/After
Before: Each function contained separate 173-line and 279-line plotting implementations
After:
Net impact: 47 fewer lines, single source of truth for plotting logic, easier maintenance of plot generation code.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
julialang-s3.julialang.orgcurl --retry 3 -C - --proto =https --tlsv1.2 --ciphers TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384 --silent --show-error --fail --location REDACTED --output /tmp/tmp.V7k3aNbuqs/juliainstaller(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.