`MonteCarloPlots` box plots use `vert=`, deprecated in Matplotlib 3.11

未关闭
#1,230 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 3 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
matplotlib, python
领域
backend, testing

调研方向

Start with rocketpy/plots/monte_carlo_plots.py at the two Axes.boxplot calls around lines 419 and 471, then read the TODO from issue #829 and check the supported Matplotlib versions in requirements.txt. The issue identifies the compatibility choice: use orientation only where supported, or raise the Matplotlib floor. Done means both calls avoid the Matplotlib 3.11 deprecation warning while remaining compatible with the declared dependency range.

由索引模型根据 Issue 内容生成。

描述

Describe the bug

MonteCarloPlots passes vert=False to Axes.boxplot in two places (L419 and L471 on develop). With Matplotlib 3.11.2 each call warns:

MatplotlibDeprecationWarning: vert: bool was deprecated in Matplotlib 3.11 and will be removed in 3.13. Use orientation: {'vertical', 'horizontal'} instead.

If 3.13 removes it as announced, these plots will fail.

To Reproduce

Any Monte Carlo box plot with Matplotlib 3.11. I saw it running test_new_run_plots_only_physical_results on Python 3.14 with -W error::DeprecationWarning.

Expected behavior

No deprecation warning, and a call that keeps working after 3.13.

Additional context

#829 kept vert on purpose, with a TODO to switch to orientation="horizontal" once Python 3.9 support ended, and requires-python is now >=3.10. The constraint left is Matplotlib's: orientation arrived in 3.10, while requirements.txt still allows 3.9.0, where boxplot(orientation=...) raises TypeError (checked with 3.9.4). So the switch needs either a check on the Matplotlib version, as pandas did in its plotting tests (pandas-dev/pandas#60584), or a floor of 3.10.

主要语言
Python
星标
1.1k
派生
280
平均合并
3 天 2 小时
30 天内合并 PR
24

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

RocketPy-Team/RocketPy 的其他 Issue

查看 RocketPy-Team/RocketPy 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。