Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 26, 2025

Improve and restructure plotting documentation for better organization and readability

Comprehensive improvements to plotting documentation including enhanced readability, consistent formatting, complete argument documentation, and restructuring into focused files for better navigation.

Major Changes

Documentation Restructuring

  • Restructured into six focused files for improved navigation:
    • plotting.md: General overview and setup (70 lines)
    • irf.md: Complete IRF plotting documentation with wrapper functions (1,280+ lines)
    • plot_solution.md: Restructured to match official help entry with state mapping, pruned solutions, and steady state explanations (400+ lines)
    • plot_conditional_forecast.md: Complete conditional forecast plotting documentation (342 lines)
    • plot_conditional_variance_decomposition.md: Complete FEVD plotting documentation (262 lines)
    • plot_model_estimates.md: Complete model estimation plotting with verified arguments (450+ lines)
  • Updated make.jl to include all six plotting documentation files
  • Added complete model definitions to code examples for standalone execution

Content Improvements

  • Restructured plot_solution.md based on official function help entry
  • Explained solution mapping, pruned higher order solutions, and steady state context
  • Clarified state vector handling and OBC enforcement
  • Documented convenience wrapper functions:
    • plot_simulation: Wrapper for plot_irf with shocks = :simulate and periods = 100
    • plot_girf: Wrapper for plot_irf with generalised_irf = true
  • All documentation matches actual function implementations

Technical Corrections

  • Fixed plot_model_estimates arguments (filter, smooth, shock_decomposition)
  • Made state a required positional argument in plot_solution
  • Removed all non-existent arguments
  • Verified all arguments against StatsPlotsExt.jl

Results

Total lines: 2,850+ lines across six files

  • Complete and accurate documentation matching actual implementations
  • Documented convenience wrapper functions for common use cases
Original prompt

improve the plotting.md
the text right now doesnt always read fluently. the overall structure is fine but the wording and how the individual paragraphs are structured and how the information is represented there can be improved. make sure to contain all the information there


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits October 26, 2025 21:20
- Simplified complex sentences while preserving technical information
- Enhanced transitions between sections for better flow
- Improved consistency in tone throughout the document
- Clarified explanations and removed redundant phrasing
- Fixed grammatical issues and improved sentence structure
- Made the text more accessible without losing technical depth

Co-authored-by: thorek1 <13523097+thorek1@users.noreply.github.com>
Co-authored-by: thorek1 <13523097+thorek1@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve wording and structure of plotting.md Improve fluency and readability of plotting.md documentation Oct 26, 2025
Copilot finished work on behalf of thorek1 October 26, 2025 21:23
Copilot AI requested a review from thorek1 October 26, 2025 21:23
Copy link
Owner

@thorek1 thorek1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot avoid using 'we' or 'you'

![Gali 2015 IRF - eps_a shock (β=0.95)](../assets/beta_095_irf__Gali_2015_chapter_3_nonlinear__eps_a__1.png)

The steady states and dynamics changed as a result of changing the discount factor. As it is a bit more difficult to see what changed between the previous IRF with β = 0.99 and the current one with β = 0.95, we can overlay the two IRFs. Since parameter changes are permanent we first must first set β = 0.99 again and then overlay the IRF with β = 0.95 on top of it:
The steady states and dynamics changed as a result of changing the discount factor. To better visualize the differences between β = 0.99 and β = 0.95, we can overlay the two IRFs. Since parameter changes are permanent, we must first reset β = 0.99 before overlaying the IRF with β = 0.95 on top of it:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot put quotation marks around these parts of the text: β = 0.99

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added quotation marks around "β = 0.99" and "β = 0.95" at line 751. (b1bed52)

![FS2000 IRF - e_a shock with auxiliary variables](../assets/with_aux_vars_irf__FS2000__e_a__1.png)

c and P appear twice, once as the variable itself and once as an auxiliary variable with the L(1) superscript, indicating that it is the value of the variable in t+1 as it is expected to be in t.
Both c and P appear twice: once as the variable itself and once as an auxiliary variable with the L(1) superscript, representing the value of the variable in t+1 as expected in t.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot put quotation marks around c, P, L(1)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added quotation marks around "c", "P", and "L(1)" at line 664. (b1bed52)

![Gali 2015 IRF - eps_a shock comparing β values](../assets/compare_beta_irf__Gali_2015_chapter_3_nonlinear__eps_a__2.png)

The legend below the plot indicates which color corresponds to which value of β and the table underneath the plot shows the relevant steady states for both values of β. Note that the steady states differ across the two values of β and also the dynamics, even when the steady state is still the same (e.g. for Y).
The legend below the plot indicates which color corresponds to each β value, with the table underneath showing the relevant steady states. Note that both the steady states and dynamics differ across the two β values, even when the steady state remains the same (e.g., for Y).
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot put quotations marks around Y and β as those are variables and parameters of the model. apply this change throughout the plotting.md

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added quotation marks around variable/parameter names throughout the document, including "Y", "β", "C", "S", "A", "P", "nu", "R", "MC", "N", "W_real", "Pi", "eps_a", "eps_z", "eps_nu", and "τ" when they appear in prose text. (b1bed52)


### `plot_attributes`

[Default: `Dict()`]: dictionary of attributes passed on to the plotting function. See the Plots.jl documentation for details.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot instead of writing [Default: Dict()] write in text what the default argument is. do this throughout plotting.md

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced all [Default: ...] formats with prose descriptions throughout plotting.md. For example, "[Default: 6, Type: Int]:" became "... (default: 6)". Applied to 15 parameter descriptions. (b1bed52)

All text in the plot is now in the computer modern font. Do note that the rendering of the fonts inherits the constraints of the plotting backend (GR in this case) - e.g. the superscript + is not rendered properly for this font.
All text in the plot now uses the Computer Modern font. Note that font rendering inherits the constraints of the plotting backend (GR in this case)—for example, the superscript + is not rendered properly for this font.

### `plots_per_page`
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot instead of using the exact argument name in quotation marks, use a more readable section title and clearly refer to the exact argument name in the following description. apply this change throughout

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced all section headers with readable titles and added explicit parameter name references in descriptions. For example, "### algorithm" became "### Solution Algorithm" with description starting "The algorithm parameter specifies...". Applied to all 20 parameter sections throughout the document. (b1bed52)

- Converted to passive voice or imperative mood throughout
- Changed 'you can' to 'can be' or imperative constructions
- Changed 'we' constructions to passive or neutral forms
- Maintained all technical content and examples
- Preserved document structure and line count

Co-authored-by: thorek1 <13523097+thorek1@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Oct 26, 2025

@copilot avoid using 'we' or 'you'

Removed all 'we' and 'you' pronouns from the documentation. Changed to passive voice or imperative mood throughout (e.g., "You can plot IRFs" → "IRFs can be plotted", "we observe" → "dynamics are observed"). All technical content preserved. (df94cb5)

Copilot AI requested a review from thorek1 October 26, 2025 21:35
Copilot finished work on behalf of thorek1 October 26, 2025 21:35
Copy link
Owner

@thorek1 thorek1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot address all comments

Copilot AI and others added 2 commits October 26, 2025 21:40
- Add quotation marks around variable/parameter names (β, Y, C, P, nu, etc.)
- Replace [Default: ...] format with prose descriptions
- Replace section headers with readable titles (e.g., `algorithm` → Solution Algorithm)
- Add explicit parameter name references in section descriptions
- Maintain all technical content and examples

Co-authored-by: thorek1 <13523097+thorek1@users.noreply.github.com>
- Remove remaining "Let's" constructions for consistency
- Fix redundant text in GIRF configuration section
- Ensure all variable/parameter mentions have quotes

Co-authored-by: thorek1 <13523097+thorek1@users.noreply.github.com>
![Gali 2015 IRF - eps_a shock (first vs second order)](../assets/compare_orders_irf__Gali_2015_chapter_3_nonlinear__eps_a__1.png)

In the plots we now see both solution methods overlaid. The first-order solution is shown in blue, the second-order solution in orange, as indicated in the legend below the plot. Note that the steady state levels can be different for the two solution methods. For variables where the relevant steady state (non-stochastic steady state for first order and stochastic steady state for higher order) is the same (e.g. `A`) we see the level on the left axis and percentage deviations on the right axis. For variables where the steady state differs between the two solution methods (e.g. `C`) we only see absolute level deviations (`abs. Δ`) on the left axis. Furthermore, the relevant steady state level is mentioned in a table below the plot for reference (rounded so that you can spot the difference to the nearest comparable steady state).
The plots now show both solution methods overlaid. The first-order solution is shown in blue, the second-order solution in orange, as indicated in the legend below the plot. Note that the steady state levels can be different for the two solution methods. For variables where the relevant steady state is the same for both methods (e.g., `A`), the level appears on the left axis and percentage deviations on the right axis. For variables where the steady state differs between methods (e.g., "C"), only absolute level deviations (`abs. Δ`) appear on the left axis. The relevant steady state levels are shown in a table below the plot for reference (rounded to help identify differences).
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot now C is in quotation marks but I actually meant these: C instead of these "C". apply this change to everything that was previously put in quotation marks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced all regular quotation marks with backticks for variable/parameter names throughout the document. Changed "C" → C, "β" → β, "Y" → Y, etc. String literals in code examples (e.g., shocks = "eps_a") were preserved. (2c1637e)

Copilot AI requested a review from thorek1 October 26, 2025 21:43
Copilot finished work on behalf of thorek1 October 26, 2025 21:43
### Shocks

Shocks determine which IRFs to calculate. Inputs can be a shock name passed on as either a Symbol or String (e.g. :y, or "y"), or Tuple, Matrix or Vector of String or Symbol. `:simulate` triggers random draws of all shocks (excluding occasionally binding constraints (OBC) related shocks). `:all_excluding_obc` contains all shocks but not the OBC related ones. `:all` also includes the OBC related shocks. A series of shocks can be passed on using either a Matrix{Float64}, or a `KeyedArray{Float64}` as input with shocks (Symbol or String) in rows and periods in columns. The `KeyedArray` type is provided by the AxisKeys package. The period of the simulation will correspond to the length of the input in the period dimension plus the number of periods defined in the `periods` argument. If the series of shocks is input as a `KeyedArray{Float64}` make sure to name the rows with valid shock names of type Symbol. Any shocks not part of the model will trigger a warning. `:none` in combination with an `initial_state` can be used for deterministic simulations.
The `shocks` parameter determines which IRFs to calculate. Shock names can be specified as either a Symbol or String (e.g. :y, or "y"), or Tuple, Matrix or Vector of String or Symbol. `:simulate` triggers random draws of all shocks (excluding those related to occasionally binding constraints). `:all_excluding_obc` includes all shocks except OBC-related ones. `:all` also includes the OBC related shocks. A series of shocks can be passed using either a `Matrix{Float64}` or a `KeyedArray{Float64}`, with shocks (Symbol or String) in rows and periods in columns. The `KeyedArray` type is provided by the AxisKeys package. The simulation length equals the input length in the period dimension plus the number of periods specified in the `periods` argument. When using a `KeyedArray{Float64}`, ensure that rows are named with valid shock names of type Symbol. Any shocks not part of the model will trigger a warning. `:none` in combination with an `initial_state` can be used for deterministic simulations.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot shocks is not a parameter but a function argument. all sections here explain function arguments. make sure they are referred to as such throughout

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed all references from "parameter" to "argument" for function arguments throughout the document. Model parameters (β, τ, etc.) remain as "parameters". (2a4f8ab)

affects the size of shocks as long as they are not set to :none or a shock matrix.
[Default: `1.0`, Type: `Real`]: size of the shocks in standard deviations. Only affects shocks that are not passed on as a matrix or `KeyedArray` or set to :none. A negative value will flip the sign of the shock.
You can set the size of the shock using the `shock_size` argument. Here we set it to -2 standard deviations:
Affects the size of shocks when they are not set to `:none` or provided as a shock matrix.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot here you forgot to mention the name of the argument: shock_size

make sure you mention it throughout

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added missing argument name shock_size to the Shock Size section description. (2a4f8ab)

…s instead of dictionaries for variable_output and has_impact
…ize the display of auxiliary variables when excluding OBC-related ones
…se replace_indices_in_symbol for improved symbol processing
…n functions for clearer logging and use verbose = false instead
…nditionally use LinearVerbosity for improved logging
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants