Weekly GitHub Report for Matplotlib: April 21, 2025 - April 28, 2025 (12:00:30)
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.
-
[Bug]: numerical instability of Path.arc for 0 degree or 360 degree arc: This issue addresses a bug in the Matplotlib library where creating an arc path of 0 or 360 degrees can result in unexpected behavior due to floating point inaccuracies, causing arcs to sometimes appear as full circles or empty arcs. The user suggests that the documentation should clarify the expected behavior of arcs, particularly when
theta2
is less thantheta1
, and proposes either updating the docstring or raising aValueError
for unexpected inputs to improve clarity and prevent numerical instability.- The comments discuss the current behavior of the arc function, with suggestions to clarify the documentation and possibly allow arcs greater than 360 degrees. There is a debate on whether the function should handle arcs beyond a full circle and how to manage numerical tolerances. Some contributors propose changes to the function's implementation to address these issues, while others suggest maintaining the current behavior to avoid breaking existing functionality.
- Number of comments this week: 12
-
[MNT]: Python 3.14.0a7 test failures: This issue reports test failures in the Matplotlib project when running tests with Python 3.14.0a7, specifically after applying a certain fix from a previous pull request. The failures include image comparison mismatches and memory leak assertions, indicating potential compatibility issues with the new Python version and possibly with NumPy optimizations.
- The comments discuss a known NumPy optimization issue affecting Python 3.14, suggesting waiting for a fix before addressing downstream library issues. A user tested Matplotlib with a patched NumPy version, resolving most issues except for genuine Matplotlib problems. The discussion includes suggestions to adjust tests to account for changes in reference counting behavior across Python versions.
- Number of comments this week: 4
-
[ENH]: add_collection(..., autolim=True) should update view limits as well: This issue addresses the enhancement of the
Axes.add_collection()
function in Matplotlib to automatically update the view limits when theautolim
parameter is set toTrue
, as it currently only updates the data limits, requiring users to make an additional call toax.autoscale_view()
. The proposed solution suggests thatAxes.add_collection(..., autolim=True)
should internally callax._request_autoscale_view()
to streamline the process and potentially include view limits handling, with a note to investigate the implementation for 3D plots.- The comments discuss whether this issue is similar to another one, with a response indicating that it is, and mentioning the initiation of a related issue to explore the solution further.
- Number of comments this week: 2
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 of Matplotlib when used with categorical variables and thedensity=True
parameter, leading to incorrect density computations due to the internal conversion of categories to integers, which affects the bin width and results in miscalculated 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 plotting labels correctly due to the lack of documentation on the category-to-integer conversion process. - [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 through
make html
ormake html-skip-subdirs
, often resulting in numerous unhelpful warnings. The proposed solution involves updating the documentation to provide clearer guidance on building individual files and potentially adding a new build target in the Makefile to streamline the process, thereby making it more accessible for developers, especially beginners, who need to frequently preview their work. - [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 positioning of subscripts and superscripts for certain mathematical operators, such as integrals, but currently leads to a parsing error when used, as demonstrated by the provided code and error message.
- [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, and while a solution has not yet been proposed, it highlights a gap in the current implementation that affects the display of mouse cursor values in the toolbar.
- [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. As a result, users must manually trigger updates to the data limits to ensure thatax.transData
uses the latest data, which can lead to confusion and unexpected behavior in data visualization.
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: 4
Summarized Issues:
- Matplotlib Arc Path Rendering Issues: This issue highlights a bug in the Matplotlib library where creating an arc path with angles of 0 or 360 degrees can result in unexpected behavior due to floating-point precision errors. These errors lead to arcs that are incorrectly rendered as full circles or empty, suggesting a need to clarify the documentation or raise a
ValueError
for unexpected inputs.
- Matplotlib Autoscaling Functionality: This issue addresses the need for the
Axes.add_collection(..., autolim=True)
function in Matplotlib to automatically update the view limits (Axes.viewLim
) in addition to the data limits (Axes.dataLim
). The current implementation requires an additional call toax.autoscale_view()
or the use of the private methodax._request_autoscale_view()
, which is cumbersome for users and lacks support for 3D plots.
- Matplotlib Test Failures with Python 3.14.0a7: This issue involves test failures in the Matplotlib project when running tests with Python 3.14.0a7, where several image comparison tests fail due to discrepancies in expected and actual images. Some tests encounter runtime warnings and assertion errors, potentially linked to a NumPy optimization issue that affects temporary elision, with a suggestion to wait for a specific NumPy pull request to be merged to address these failures.
- Matplotlib FuncAnimation Type-Checking Problem: This issue highlights a type-checking problem in the
FuncAnimation
function of Matplotlib, where type checkers like MyPy incorrectly flag a function returningNone
as incompatible when used as a parameter. Despite the code executing correctly whenblit=False
, a potential solution involves the use ofoverload
andLiteral
for theblit
argument.
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: 7
Summarized Issues:
- Error Handling in Matplotlib Functions: The
matplotlib.pyplot.pie()
function raises aValueError
when input data containsNaN
, indicating a need for better error handling or documentation. Similarly, anAttributeError
occurs with the 'side' attribute of violin plots in Matplotlib 3.9, suggesting environmental setup issues rather than a bug.
- Matplotlib Plot Customization Issues: Users face challenges with linestyle customization in
pyplot.hist
when usinghisttype='step'
, as lines default to 'solid' instead of the specified style. Additionally, histogram plots using float32 precision with a logarithmic scale miss small data points, likely due to precision limitations in NumPy.
- Installation and Compatibility Problems: Installing Matplotlib on Windows 10 x86 with Python 3.13.3 fails due to a build error with the kiwisolver wheel, likely because of missing pre-built wheels for 32-bit systems. Downgrading to Python 3.11 is suggested to use older package versions that support 32-bit Windows.
- Documentation and Usability Enhancements: The lack of clear documentation for the "spines" object in
matplotlib.axes.Axes
suggests a need for better references or converting "spines" into a property. Additionally, users struggle with making tick labels reappear after isolating previously shared axes, especially in non-rectilinear geoplots.
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: 7
Key Open 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 updates to the typing to reflect different return types required by FuncAnimation
depending on the blit
parameter, as well as compliance with testing and documentation guidelines.
- URL: pull/29968
- Merged: No
2. FIX: update arc to do better rounding and allow wrap: This pull request addresses numerical instability issues in arc rounding as described in issue #29953, introduces an optional wrap
feature for handling larger arcs while maintaining the original behavior as default, updates the docstring for Numpy compatibility, and clarifies documentation regarding arc directionality, ensuring arcs always proceed counterclockwise.
- URL: pull/29962
- Merged: No
3. Fix Cursor widget drawing behavior with blitting support: This pull request addresses the inefficiency in the Cursor widget's redrawing behavior when the mouse moves out of the axis by implementing blitting support, thereby enhancing the performance and responsiveness of the widget in the Matplotlib library.
- URL: pull/29971
- Merged: No
Other Open Pull Requests
- Enhancements to Matplotlib's
ax.add_collection
and Autoscaling: This pull request improves theax.add_collection(..., autolim=True)
feature by automatically updating view limits, removing the need for explicit autoscale calls. It maintains current behavior for 3D Axes with a temporary private value and suggests future improvements for related issues.
- Handling of AxesWidgets in Matplotlib: This pull request resolves issues with AxesWidgets associated with "inset_axes" that are positioned outside their parent axes. It improves the recomputation logic to ensure events are correctly reparented, preventing exceptions in such scenarios.
- Resilience of Refcount Tests in Matplotlib: This pull request enhances the resilience of refcount tests by checking changes in reference count rather than absolute values. This approach better accommodates potential changes in future Python versions.
- Improvement of Mathtext Internal Structures Representation: This pull request improves the
repr
of mathtext boxes for debugging by displaying them more clearly, rather than in a single line. It also includes a minor cleanup by removing unnecessary nonlocal declarations in nested functions.
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: 11
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 includes updates to the typing to reflect different return types required by FuncAnimation
depending on the blit
parameter, as well as tests, examples, and documentation updates to support these changes.
- URL: pull/29967
- Merged: No
2. Handled non finite values in ax.pie - issue #29860: This pull request addresses issue #29860 by ensuring that the pie()
function in lib/matplotlib/axes/_axes.py
raises a clear value error message when non-finite values, such as infinite or NaN, are present in the input data, and includes a new test, test_pie_non_finite_values()
, to verify this functionality.
- URL: pull/29873
- Merged: 2025-04-24T21:49:33Z
3. Simplify colored_line()
implementation in Multicolored lines example: This pull request simplifies the colored_line()
implementation in the Multicolored lines example by reducing the number of lines, eliminating the use of non-array-api compatible Numpy functions to improve readability, calling autoscale_view
to remove the need for manual set_xlim
calls, and adding stacklevel=2
in warnings.warn
, while also providing a dedicated package for this function.
- URL: pull/29954
- Merged: 2025-04-22T15:49:41Z
Other Closed Pull Requests
- Backporting Changes to v3.10.x Branch: This topic involves backporting changes to the v3.10.x branch of the Matplotlib project. The pull requests focus on using placeholders for text in layout tests to improve test consistency and maintainability, and backporting the documentation of
Axes.spines
to ensure relevant updates are included in this version branch.
- Updating Continuous Integration Setup: These pull requests address the update of the continuous integration setup by removing the soon-to-be-unsupported GitHub Actions ubuntu-20.04 runner. They involve manual backports to different branches, resolving conflicts due to additional lines in the main branch.
- Documentation and Build Process Improvements: This topic covers improvements in the documentation and build process for the Matplotlib project. The pull requests include cherry-picking a specific commit to maintain consistency in the documentation build process and adding a docstring to a class-level type hint for
Axes.spines
.
- Enhancements to Matplotlib Library: These pull requests introduce enhancements to the Matplotlib library. They include the introduction of a
HandlerPatchCollection
forPatchCollection
objects to appear in legends and updates to theGridSpec.update
method to use an explicit signature and change error types for invalid keyword arguments.
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 | 19 | 4 | 7 | 46 |
QuLogic | 14 | 4 | 0 | 18 |
rcomer | 6 | 4 | 1 | 22 |
jklymak | 10 | 1 | 2 | 19 |
anntzer | 10 | 4 | 1 | 14 |
dstansby | 9 | 0 | 0 | 16 |
tacaswell | 13 | 1 | 0 | 11 |
trygvrad | 4 | 2 | 0 | 11 |
Lynsoo | 13 | 2 | 0 | 1 |
jayaddison | 5 | 1 | 2 | 2 |