Repository navigation
BUG: Apply plot_params to impulse response curves - #10720
Merged
Merged
Conversation
Member
|
LGTM. Thanks. |
4 of 5 tasks
bashtage
added a commit
that referenced
this pull request
Nov 11, 2026
#10720 applies plot_params to the impulse response curves in IRAnalysis.plot and plot_cum_effects. Before, plot_params was accepted and ignored, so the release note belongs under "Bug Fixes", "Time series analysis", not under "New Features and Enhancements". It now also lists :pr:`10720` and says that keys of plot_params that are not Line2D properties, which were ignored before, now raise an AttributeError. The plot_params entries of IRAnalysis.plot, IRAnalysis.plot_cum_effects and irf_grid_plot link matplotlib.lines.Line2D (matplotlib is in the intersphinx mapping), state the AttributeError and add a versionchanged 0.15.1 note. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
bashtage
added a commit
that referenced
this pull request
Nov 11, 2026
#10720 applies plot_params to the response curves, so keys that are not Line2D properties now raise an AttributeError where they were ignored. Add test_irf_plot_params_invalid_key (fontsize and figsize, for plot and plot_cum_effects, the error names the key) and test_irf_plot_params_default_style (plot_params={} and None leave the response curves and the other lines in the default style; this one also passes without the change of #10720). The figure left open by the failed call is closed by the close_figures fixture. test_irf_plot_params and test_irf_plot_err_bands_kwarg lacked the thread_unsafe mark that the other matplotlib tests of the file carry, although pyplot state is global: add it to both. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
bashtage
added a commit
that referenced
this pull request
Nov 11, 2026
DOC: Follow up #10720 on plot_params errors, release note and tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
IRAnalysis.plotandplot_cum_effectsacceptplot_params, butirf_grid_plotignores it. Apply these properties to the response curves, including Matplotlib aliases; confidence bands and reference lines keep their existing styles.Closes #380:
figsizeis already forwarded by the current implementation, and this fixes the remainingplot_paramsproblem.Validation:
All 12 new regression cases fail before the fix and pass afterwards.
Full
statsmodels/tsa/vector_ar/testsdirectory: 269 passed.Tests verify both plotting methods, long and short property names, no/asymptotic/precomputed simulation bands, unchanged numerical values and other line styles, and unchanged caller options.
Coverage confirms execution of the new functional line.
Repository-wide Ruff and
git diff --checkpassed.Focused Sphinx HTML build of all changed API docstrings and guide/release-note passages passed with warnings treated as errors. The full documentation-site build and full statsmodels test suite were not completed.
closes IRF plotting from VARResults #380
tests added / passed.
code/documentation is well formatted.
properly formatted commit message.
AI Disclosure
Contributions must comply with the statsmodels AI Policy.
Tool(s): OpenAI Codex.
Used for: reproducing the bug, implementing the fix, writing tests and documentation, running validation, and preparing this submission after human review.
I have personally read, understood, and can explain every line of this diff, and
have verified the statistical/numerical correctness of the change.