statsmodels icon indicating copy to clipboard operation
statsmodels copied to clipboard

DOC: Fix broken in `linear_regression_diagnostics_plots`

Open luke396 opened this issue 1 year ago • 2 comments

  • [x] closes #9157
  • [ ] tests added / passed.
  • [ ] code/documentation is well formatted.
  • [ ] properly formatted commit message. See NumPy's guide.

Notes:

  • It is essential that you add a test when making code changes. Tests are not needed for doc changes.
  • When adding a new function, test values should usually be verified in another package (e.g., R/SAS/Stata).
  • When fixing a bug, you must add a test that would produce the bug in main and then show that it is fixed with the new code.
  • New code additions must be well formatted. Changes should pass flake8. If on Linux or OSX, you can verify you changes are well formatted by running
    git diff upstream/main -u -- "*.py" | flake8 --diff --isolated
    
    assuming flake8 is installed. This command is also available on Windows using the Windows System for Linux once flake8 is installed in the local Linux environment. While passing this test is not required, it is good practice and it help improve code quality in statsmodels.
  • Docstring additions must render correctly, including escapes and LaTeX.
image

Previously, the page would break due to an error in the code, specifically because the 'seaborn-paper' style was sometimes missing. To address this, I replaced it with another style and added a fallback to 'default' for added protection.

For now, it works well in my local with python==3.10 and matplotlib==3.8.3

luke396 avatar Feb 20 '24 13:02 luke396

Could you fix all places like >>> cls(plot_context=\"seaborn-paper\")\n", (basically where it says seaborn-paper)

bashtage avatar Feb 20 '24 16:02 bashtage

Could you fix all places like >>> cls(plot_context=\"seaborn-paper\")\n", (basically where it says seaborn-paper)

Hi @bashtage , I fix them by searching and replacing all seaborn-paper to seaborn-v0_8.

luke396 avatar Feb 21 '24 02:02 luke396

LGTM. Thanks.

bashtage avatar Mar 18 '24 09:03 bashtage