Weekly GitHub Report for Matplotlib: June 16, 2025 - June 23, 2025 (12:05:01)
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. Additionally, it introduces a version gate for GTK4 calls and enhances documentation.
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]: Inner border is not rendered correctly when using log-scale and polar projection.: This issue describes a bug in the Matplotlib library where the inner border of a polar plot is not rendered correctly when using a logarithmic scale and setting a radial origin, causing the border to remain at the center instead of adjusting to the specified radial origin. The problem is demonstrated with a code snippet and images showing the actual and expected outcomes, highlighting the discrepancy in the inner border's position.
- The comments discuss potential solutions and clarifications for the issue, with suggestions to use
ax.set_rmin()
and observations that the inner spine is misplaced. A user clarifies the expected outcome, and another acknowledges the bug, suggesting that the logic in the code might need adjustment to account for the axis scale. Further investigation reveals that the issue might be related to the Axes wedge, which affects the inner spine's location. - Number of comments this week: 8
- The comments discuss potential solutions and clarifications for the issue, with suggestions to use
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 because the function converts categorical variables to integers, which affects the bin width and results in miscalculated density values. Additionally, the issue points out the misalignment of labels, as the function does not position labels precisely at the center of the bars, and suggests improvements such as setting the bin width to 1 for categorical data and providing clear documentation on the 'category to int' 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 and can be cumbersome for developers, especially beginners, who need to preview their work multiple times. The proposed solution involves updating the documentation to provide clearer guidance and potentially adjusting the Sphinx Gallery configuration to streamline the process, making it more accessible and less time-consuming for contributors.
- [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 in the provided code and examples.
- [ENH]: Fix precision displayed by LogFormatter.format_data_short: This issue addresses the need to enhance the LogFormatter in a project by ensuring it displays mouse cursor values with a precision that matches the cursor pointing accuracy, similar to the existing functionality for linear formatters. The problem has been open for over 437 days, indicating a need for a solution to align the precision of log formatters with that of linear formatters, although no specific solution has been proposed 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
) when new data is added to the axes, contrary to what the documentation suggests. The user reports that this discrepancy requires a manual update of data limits using methods likeset_xlim
andset_ylim
to ensureax.transData
uses the latest data limits, which is both confusing and counterintuitive.
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 Polar Plot Rendering Issue: A bug in the Matplotlib library causes the inner border of a polar plot to be incorrectly rendered at the center instead of the specified radial origin when using a logarithmic scale. Attempts to adjust the radial minimum do not resolve the issue, indicating a potential flaw in the logic handling the axis scale within the library's code.
- Matplotlib Axis Sharing Restriction: Users encounter a bug in the Matplotlib library where they are unable to share both the x and y axes when setting a specific aspect ratio. This is due to a restriction in the code that raises a RuntimeError, although removing the restrictive code allows the functionality to work as expected.
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: 2
Summarized Issues:
- Matplotlib Polar Plot
rorigin
Bug: The issue with therorigin
parameter in Matplotlib's polar plots with a logarithmic radial scale causes unintuitive behavior. This is due to therorigin
being tied to the radial axis values in a way that is not clearly documented, leading to unexpected plot layouts when standardizing appearances across plots with varying data magnitudes.
- Misleading Diagram in Matplotlib Documentation: A misleading diagram in the Matplotlib documentation for the
subplots_adjust
function incorrectly suggests the measurement of the "right" and "top" parameters. The diagram implies incorrect measurement points, prompting a suggestion to correct both the visual representation and the accompanying text for clarity.
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: 15
Key Open Pull Requests
1. ci: Add Python 3.14b03 to the test matrix: This pull request adds Python 3.14b03 to the test matrix of the Matplotlib project, with a configuration that allows test failures to occur without breaking the build process, and includes several commits addressing dependencies, timeout settings, and updates to the GitHub workflow.
- URL: pull/30204
- Merged: No
2. savefig's pad_inches specifies per border padding: This pull request introduces a new feature to the Matplotlib library that allows users to specify padding for each border individually when saving a figure using the savefig
function, by adding a new padding function in transforms.py
, updating the backend bases, and revising the relevant documentation, thereby addressing the issue of achieving compact but appropriately bounded borders in complex plots.
- URL: pull/30183
- Merged: No
3. Fixed several accuracy bugs with image resampling: This pull request addresses several accuracy bugs in the image resampling process within the Matplotlib library by correcting the calculation of filtering weights, aligning them properly in their array, and ensuring values in the lookup table for nonaffine transformations are rounded instead of truncated, thereby eliminating biases and improving the accuracy of linear interpolation.
- URL: pull/30184
- Merged: No
Other Open Pull Requests
- Code Maintainability Enhancements: This topic includes updates to automate the generation of getter and setter methods and replace
*args, **kwargs
with explicit function signatures. These changes aim to enhance code maintainability and address issue #30160 by ensuring that the code is more structured and easier to manage.
- Rendering and Plotting Fixes: This topic covers fixes for rendering issues in polar plots and stackplots. The pull requests ensure correct placement of gridlines and remove unnecessary calls to set the figure, improving the visual accuracy of plots.
- Deepcopy and Metaclass Adjustments: This topic addresses infinite recursion in the
Path.__deepcopy__
method by introducing a metaclass. The changes resolve issue #29157 and include additional fixes to improve the method's functionality without relying on private CPython methods.
- Abstract Base Class for Normalize: This pull request proposes an abstract base class for the Normalize functionality, offering an alternative to previous implementations. It allows for a comparison between a protocol and an abstract base class approach, enhancing the flexibility of the codebase.
- Type Hints and Error Handling Improvements: This topic introduces type hints and enhances error handling in the
_type1font.py
file. The changes streamline parsing logic and ensure the file passes strict type checks, improving code reliability and maintainability.
- MathTextParser Cache Management: This pull request enhances the
MathTextParser
class to dynamically clear and rebuild the symbol cache. It ensures that the correct symbols are used when the backend or font changes, resolving previous inaccuracies and addressing issue #26143.
- Python 3.14 Wheel Builds: This pull request enables wheel builds for Python 3.14, ensuring they are included in nightly uploads. It also reactivates tests in areas where previously unavailable Pillow wheels are now accessible, enhancing compatibility with the latest Python version.
- Codebase Type Replacement: This pull request proposes replacing the
facepair_t
type withstd::optional
to convey functionality more clearly. The changes have been tested but not yet merged, aiming to improve code clarity and maintainability.
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: 8
Key Closed Pull Requests
1. Update type hints to fix #30160: This pull request aims to update type hints in the Matplotlib library to address issue #30160 by modifying the tools/boilerplate.py
to autogenerate getter/setter methods for xlim
and ylim
, replacing *args, **kwargs
with explicit method signatures in lib/matplotlib/pyplot.py
for methods like savefig
and set_loglevel
, adding overloads for subplot
and show
, and introducing tests to verify the updated signatures, although it was ultimately not merged.
- URL: pull/30193
- Merged: No
- Associated Commits: e57b3, 608b5, 41b70, 1ff2b, b863b, f4693, 4ea0f, 92dc0, 66ee0, e4625, 64e79, 00624
2. DOC: expand polar example: This pull request expands the polar example in the Matplotlib documentation by including additional examples on setting limits and using the rorigin
parameter, and it has been successfully merged into the project.
- URL: pull/30180
- Merged: Yes
3. Fixed incomplete deletion of all images that have passed tests before upload: This pull request addresses a bug in the deletion process of images that have passed tests before uploading by ensuring that symbolic links, which were previously skipped due to a misconfiguration in the find
command, are now properly deleted, and extends this cleanup to include GIF files, thereby reducing the size of the uploaded artifact by approximately 50 MB.
- URL: pull/30188
- Merged: Yes
Other Closed Pull Requests
- Backporting Documentation Improvements: The pull requests focus on backporting documentation improvements from a previous PR to different branches of the Matplotlib project. These improvements specifically expand the polar example, ensuring consistency and clarity across the v3.10.x and v3.10.3-doc branches.
- Simplifying RendererAgg Function: This pull request simplifies the
RendererAgg::draw_markers
function by replacing fixed-size and dynamic buffers with a standard C++ container. This change enhances code maintainability and efficiency by allowing the container to manage its own cleanup.
- Fixing Polar Plot Bug: The pull request addresses a bug in polar plots where removing ticks would distort the aspect ratio. By modifying
PolarAxes._init_axis()
, it ensures that tick visibility no longer affects autoscaling or aspect locking, maintaining correct scaling even when ticks are hidden.
- Removing Nested Gridspecs Example: This pull request removes the last user demonstration example related to nested gridspecs from the Matplotlib documentation. The concept is already explained in other documentation files, making the example redundant and closing issue #25800.
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 |
---|---|---|---|---|
CorenthinZ | 25 | 0 | 0 | 0 |
QuLogic | 9 | 6 | 0 | 4 |
ayshih | 9 | 3 | 0 | 6 |
jklymak | 5 | 1 | 0 | 10 |
timhoffm | 3 | 1 | 1 | 9 |
jkseppan | 11 | 3 | 0 | 0 |
anntzer | 2 | 2 | 0 | 4 |
No author found | 7 | 0 | 0 | 0 |
ZPyrolink | 0 | 5 | 1 | 1 |
tillboehringer | 0 | 0 | 2 | 4 |