Weekly GitHub Report for Matplotlib: April 28, 2025 - May 05, 2025 (12:00:50)
Weekly GitHub Report for Matplotlib
Thank you for subscribing to our weekly newsletter! Each week, we deliver a comprehensive summary of your GitHub project's latest activity right to your inbox, including an overview of your project's issues, pull requests, contributors, and commit activity.
Table of Contents
I. News
1.1 Recent Version Releases:
The current version of this repository is v3.10.1
1.2 Version Information:
Released on February 27, 2025, this first bugfix update for the 3.10.x series addresses several issues, including respecting array alpha in image interpolation, removing md5 usage for FIPS compliance, and fixing various plotting and figure handling bugs, alongside documentation enhancements.
II. Issues
2.1 Top 5 Active Issues:
We consider active issues to be issues that that have been commented on most frequently within the last week. Bot comments are omitted.
-
Missing type hints for
matplotlib.dates.DateFormatter
: This issue highlights the absence of type hints for theDateFormatter
function in thematplotlib.dates
module, which causes an error when running Mypy in strict mode. The user is seeking a resolution to this problem to ensure that their codebase can utilize Mypy without suppressing errors related to untyped functions in Matplotlib.- The comments discuss the lack of type annotations in the
dates
module, with a suggestion that the module is currently untyped and that Matplotlib uses stub files for type information, inviting contributions to add these annotations. - Number of comments this week: 2
- The comments discuss the lack of type annotations in the
Since there were fewer than 5 open issues, all of the open issues have been listed above.
2.2 Top 5 Stale Issues:
We consider stale issues to be issues that has had no activity within the last 30 days. The team should work together to get these issues resolved and closed as soon as possible.
- [Bug]: Misalignment of Labels and Incorrect Density Values in
ax.hist()
for Categorical Variables: This issue highlights a bug in theax.hist()
function when used with categorical variables and thedensity=True
parameter, where the density values are incorrectly computed due to the internal conversion of categories to integers, leading to miscalculated bin widths and density values. Additionally, the issue addresses the misalignment of labels, as the function does not position them precisely at the center of the bars, complicating the process of aligning x-ticks and understanding the category-to-integer conversion. - [MNT]: Ease building just one Sphinx Gallery example file: This issue addresses the challenge of efficiently building a single Sphinx Gallery example file, which currently requires a lengthy process and involves editing configuration files, leading to numerous warnings. The proposed solution suggests improving documentation and configuration to streamline the process, making it more accessible for developers, especially beginners, who need to frequently preview individual gallery entries.
- [ENH]: Parse "\limits" in mathtext: This issue pertains to a problem encountered in the matplotlib library's mathtext module, where the parsing of LaTeX expressions containing the "\limits" command fails, resulting in a ValueError. The "\limits" command is intended to adjust the placement of subscripts and superscripts for certain mathematical operators, such as integrals, but currently leads to a parsing error when used, as demonstrated in the provided code example.
- [ENH]: Fix precision displayed by LogFormatter.format_data_short: This issue addresses the need to enhance the LogFormatter in a GitHub project by fixing the precision of values displayed, ensuring they match the cursor pointing precision, similar to the existing functionality for linear formatters. The problem has been open for over a year, indicating a need for improvement in how log formatters display significant digits in the toolbar, but no proposed solution has been provided yet.
- [Bug]:
ax.transData
does not honor data limits: This issue highlights a bug in Matplotlib where theax.transData
transformation does not automatically update to reflect changes in data limits (xlim
andylim
), contrary to what the documentation suggests. The user reports that this discrepancy requires manual intervention to update the data limits, which can lead to confusion and unexpected behavior when plotting data.
2.3 Open Issues
This section lists, groups, and then summarizes issues that were created within the last week in the repository.
Issues Opened This Week: 2
Summarized Issues:
- Matplotlib PGF file generation with IEEEtran document class: This issue describes a bug in Matplotlib where generating PGF files with the
IEEEtran
document class results in incorrect whitespace in the legend when the font size is smaller than 5. The user suggests providing an interface to modify the document class directly to resolve this problem.
- Absence of type hints in Matplotlib DateFormatter: This issue highlights the absence of type hints for the
matplotlib.dates.DateFormatter
function, which causes errors when running Mypy in strict mode. The user seeks to use Mypy across their codebase without suppressing such errors.
2.4 Closed Issues
This section lists, groups, and then summarizes issues that were closed within the last week in the repository. This section also links the associated pull requests if applicable.
Issues Closed This Week: 4
Summarized Issues:
- Matplotlib Function Return Type Handling: This issue highlights a bug in the Matplotlib library where type checkers, such as MyPy, incorrectly flag a function returning
None
as incompatible with theFuncAnimation
function. The code executes correctly whenblit=False
, suggesting a need for improved type handling to accommodate functions with arbitrary return types.
- Matplotlib Segmentation Fault in ft2font: A segmentation fault (SIGSEGV) occurs in the ft2font component of Matplotlib when running tests with the pytest-cov plugin. This issue is suspected to be related to an exception handling problem at the C/Python boundary, potentially involving pybind11, and is resolved by recompiling with clang.
- Matplotlib
ax.hist
Argument Handling: There are bugs in Matplotlib'sax.hist
function where thelw
argument for line width is ignored, requiring the use oflinewidth
instead, and using theedgecolor
argument results in an "Invalid RGBA argument" error. These discrepancies were not present in earlier versions, and fixes have been implemented for future releases.
2.5 Issue Discussion Insights
This section will analyze the tone and sentiment of discussions within this project's open and closed issues that occurred within the past week. It aims to identify potentially heated exchanges and to maintain a constructive project environment.
Based on our analysis, there are no instances of toxic discussions in the project's open or closed issues from the past week.
III. Pull Requests
3.1 Open Pull Requests
This section provides a summary of pull requests that were opened in the repository over the past week. The top three pull requests with the highest number of commits are highlighted as 'key' pull requests. Other pull requests are grouped based on similar characteristics for easier analysis. Up to 25 pull requests are displayed in this section, while any remaining pull requests beyond this limit are omitted for brevity.
Pull Requests Opened This Week: 11
Key Open Pull Requests
1. Implement head resizing (and reversal) for larrow/rarrow/darrow: This pull request introduces the ability to adjust the size and orientation of arrow heads in annotations using patches.BoxStyle.LArrow
, RArrow
, and DArrow
by allowing head_width
and head_angle
parameters, which also enable the creation of reversed arrow heads, thereby enhancing customization options for arrow annotations and addressing issues #24618 and #24744.
- URL: pull/29998
- Merged: No
- Associated Commits: 2f366, e8d7e, 15bd7, 4f574, 5c3fa, 80655, 0471e, 212cb, 273a2, bf2d0, 0ea2f, d7fd4, ff34b, d9b0b
2. Implement text shaping with libraqm: This pull request aims to implement text shaping using the libraqm library in the Matplotlib project, while also addressing various font-related updates and test adjustments, such as stabilizing mathtext baselines, updating FreeType, and fixing kerning issues, to enhance text rendering capabilities.
- URL: pull/30000
- Merged: No
- Associated Commits: b3ad4, 41a5a, b8d48, f00d7, e5442, 493ff, ebf1c, 93d64, 18a5a, fddbf, f1cdf, 4aea7, d1780
3. FIX: Move all tests using subprocess to the same worker on windows: This pull request aims to address potential state-crossing issues when launching subprocesses in tests on Windows by grouping all such tests to run on the same worker using xdist_group
with --dist=loadgroup
, specifically targeting Windows pipelines to potentially resolve timeout issues, while leaving tests on other systems unaffected.
- URL: pull/29981
- Merged: No
Other Open Pull Requests
- Windows Image Update: This pull request updates the pinned oldest Windows image on Azure from windows-2019, which is set to be deprecated on June 1, 2025. It also tests if the timeouts mentioned in issue #29797 are related to the use of the windows-2019 image.
- Error Message Enhancement: This pull request enhances error messages in the Matplotlib project by including suggestions for close matches when a key is not found. It builds on a previous attempt to address this issue and makes it more general for improved user guidance.
- Scale Class Refactoring: This pull request refactors the built-in scale classes in the Matplotlib project to make the axis parameter optional. It introduces a decorator to handle constructors with or without the axis parameter and updates the scale_factory() function.
- TkAgg Backend Stability: This pull request addresses and resolves issue #28330 by fixing the instability of small plot sizes when using the TkAgg backend in Matplotlib. It ensures more consistent rendering of plots.
- Widget Testing Enhancement: This pull request enhances widget testing by triggering events through standard callbacks, providing a more comprehensive test. It addresses minor issues such as nonstandard widget method names and adjusts test coordinates to reflect realistic scenarios, closing issue #22720.
- Deprecation Removal: This pull request aims to remove the
apply_theta_transforms
argument from the Matplotlib project, effectively eliminating the deprecation introduced in a previous pull request. It is currently not merged.
- Function Removal: This pull request proposes the removal of the
cm.get_cmap
function from the Matplotlib library. The decision to implement this change is set for version 3.11.
- Linting for .pyi Files: This pull request enables linting for
.pyi
files in the Matplotlib project, addressing issues such as line length and fixing the__all__
variable in__init__.pyi
. It also removes unused imports.
3.2 Closed Pull Requests
This section provides a summary of pull requests that were closed in the repository over the past week. The top three pull requests with the highest number of commits are highlighted as 'key' pull requests. Other pull requests are grouped based on similar characteristics for easier analysis. Up to 25 pull requests are displayed in this section, while any remaining pull requests beyond this limit are omitted for brevity.
Pull Requests Closed This Week: 23
Key Closed Pull Requests
1. fix FuncAnimation class: This pull request addresses the need to fix the FuncAnimation
class by ensuring that the update function passed to it matches the expected signatures, thereby preventing type errors and runtime issues such as freezing or crashing, and it includes necessary documentation, testing, and examples to demonstrate the changes.
- URL: pull/29968
- Merged: No
2. Adding elinestyle property to errorbar: This pull request introduces an "elinestyle" property to the errorbar function in Matplotlib, allowing users to specify the line style of error lines directly when creating an errorbar, thereby simplifying the process of customizing error line styles without needing to individually adjust the horizontal and vertical line objects.
- URL: pull/29879
- Merged: 2025-04-30T01:09:45Z
3. WIP: Try running windows tests with a single worker: This pull request is a test PR aimed at diagnosing subprocess failures in Windows tests by running them sequentially with a single worker to verify if this approach prevents timeouts, as part of an alternative strategy to address the issue without intending to merge the changes.
- URL: pull/29986
- Merged: No
Other Closed Pull Requests
- Backporting Changes to v3.10.x Branch: This topic covers multiple pull requests that involve backporting various changes to the v3.10.x branch of the Matplotlib project. These changes include improvements to documentation, corrections of typographical errors, and enhancements to the layout of cheatsheets, ensuring consistency and accuracy across different versions.
- Documentation Enhancements: Several pull requests focus on improving the documentation of the Matplotlib project. These enhancements include adding descriptions to modules, correcting function signatures, and updating documentation for better clarity and understanding.
- Typographical Corrections: This topic includes pull requests that address and correct typographical errors within the Matplotlib project. These corrections ensure that the documentation and code are free from spelling mistakes and inconsistencies.
- Code Enhancements and Refactoring: Several pull requests focus on enhancing the codebase of the Matplotlib project. These enhancements include improving the resilience of tests, refining internal representations, and using inline lambdas for better code readability.
- Build System Improvements: This topic covers pull requests that address issues in the Meson build system used by the Matplotlib project. These improvements ensure that the correct Python version is used during builds, which is crucial for generating accurate version information.
- Typing and Functionality Adjustments: A pull request addresses adjustments to the typing of
FuncAnimation
in the Matplotlib library. This change allows for more permissive type definitions, reducing unnecessary type errors and improving runtime functionality.
3.3 Pull Request Discussion Insights
This section will analyze the tone and sentiment of discussions within this project's open and closed pull requests that occurred within the past week. It aims to identify potentially heated exchanges and to maintain a constructive project environment.
Based on our analysis, there are no instances of toxic discussions in the project's open or closed pull requests from the past week.
IV. Contributors
4.1 Contributors
Active Contributors:
We consider an active contributor in this project to be any contributor who has made at least 1 commit, opened at least 1 issue, created at least 1 pull request, or made more than 2 comments in the last month.
If there are more than 10 active contributors, the list is truncated to the top 10 based on contribution metrics for better clarity.
Contributor | Commits | Pull Requests | Issues | Comments |
---|---|---|---|---|
timhoffm | 24 | 6 | 4 | 30 |
QuLogic | 26 | 7 | 0 | 12 |
dstansby | 12 | 4 | 0 | 17 |
tacaswell | 16 | 2 | 0 | 11 |
anntzer | 7 | 5 | 1 | 14 |
jklymak | 8 | 1 | 0 | 14 |
rcomer | 6 | 0 | 1 | 15 |
trygvrad | 4 | 2 | 0 | 11 |
Lynsoo | 13 | 1 | 0 | 1 |
CharlieThornton33 | 10 | 1 | 0 | 0 |