Weekly GitHub Report for Matplotlib: March 18, 2025 - March 25, 2025 (12:14:04)
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. It also 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.
-
[MNT]: ci: ubuntu-20.04 GitHub Actions runner will soon be unmaintained: This issue highlights the upcoming deprecation of the
ubuntu-20.04
GitHub Actions runner image used in thetests.yml
workflow, as it will soon be unsupported, and suggests removing theubuntu-20.04
jobs by the end of March 2025. The proposed fix involves transitioning to a newer Ubuntu version, such asubuntu-22.04
, to ensure continued support and compatibility with the project's testing requirements.- The comments discuss the need to remove or update the
ubuntu-20.04
jobs, with suggestions to move certain tests toubuntu-22.04
orubuntu-24.04
. There is a consensus on maintaining some tests, like those formatplotlib-inline
, by moving them to a different configuration file. Additionally, there is a discussion about backporting changes to older branches, specifically for Python 3.10, while ensuring continued testing for compatibility. - Number of comments this week: 5
- The comments discuss the need to remove or update the
-
[ENH]: Make savefig close plot by default: This issue suggests enhancing the
savefig
function in Matplotlib to automatically close the plot after saving, as the user finds it redundant to manually close the plot in most cases. The user proposes adding an optional argument,keep_open=True
, for those who wish to keep the plot open after saving.- The comments discuss potential drawbacks of automatically closing plots, such as the need to modify and save plots multiple times, and the complexity of changing the current behavior. Some users oppose the change, arguing that it is not standard for programs to close documents after saving. Others suggest alternative solutions, like opting out of figure tracking or using context managers, and request more information about the original use case to better understand the need for this feature.
- Number of comments this week: 5
-
[Bug]: pcolormesh passes alpha value down to colormap instead of alpha blending: This issue describes a bug in the Matplotlib library where the
pcolormesh
function, when used with a set alpha parameter and a colormap that utilizes the alpha channel, incorrectly passes the alpha value to the colormap instead of applying it as an additional alpha blend. The expected behavior is for the colormap's resulting values to be further blended with the alpha parameter frompcolormesh
, but currently, the alpha parameter is being used as a constant, affecting the transparency of the entire plot.- The comments discuss the inconsistency in handling alpha values in Matplotlib, with suggestions for a consistent approach across the library. A workaround is proposed to manually adjust the alpha channel before passing data to
pcolormesh
. Users share experiences of unexpected results when using colormaps with alpha, and one user resolves their issue by modifying the colormap's maximum alpha value instead of usingpcolormesh
's alpha parameter. - Number of comments this week: 4
- The comments discuss the inconsistency in handling alpha values in Matplotlib, with suggestions for a consistent approach across the library. A workaround is proposed to manually adjust the alpha channel before passing data to
-
[Bug]: Saving as an SVG and PDF produce different outputs with Latex characters, with wrong character sizing: This issue highlights a bug in the Matplotlib library where saving plots with LaTeX-rendered characters as SVG files results in incorrect character sizing, while the same plots render correctly when displayed with
plt.show()
or saved as PDF files. The problem seems to be related to the use of specific style files and the handling of font sizes in the SVG output, which does not occur in the PDF output.- The comments discuss the absence of certain style files in Matplotlib, making it difficult to determine if the issue is with Matplotlib or the style files. A user suggests that the problem is similar to a previously reported issue and provides a reproducible example. Another user identifies a solution involving a patch that addresses the font size rendering problem by using a different package, which resolves the issue and supersedes previous attempts to fix it.
- Number of comments this week: 3
-
[Doc]: Improve install guidance: This issue is about improving the installation guidance documentation for the Matplotlib project by addressing outdated links and enhancing the visibility and content of installation instructions on the website. The proposed improvements include updating or removing outdated installation quick-start guides, ensuring clear navigation to installation information from the main page, and expanding the complete install guide to include more information on package managers.
- The comment discusses the possibility of restructuring the installation instructions to be more integrated across different guides and suggests removing outdated sections since the necessary information is already available in the quickstart guide.
- Number of comments this week: 1
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.
- [Doc]: Release docs include Next what's new pages: This issue pertains to the inclusion of a "Next what's new" page in the release documentation of a project, which ideally should not be present in the documentation for official releases. The problem highlights a need for improvement in the documentation process to ensure that only relevant and finalized content is included in release versions.
- [ENH]: out-of-tree Pyodide builds in CI for Matplotlib: This issue is about implementing out-of-tree Pyodide builds for Matplotlib using the Emscripten toolchain to create wasm32 wheels, which would enhance the interoperability of the Scientific Python ecosystem with Pyodide and facilitate interactive documentation in JupyterLite notebooks. The proposed solution involves setting up a CI pipeline on GitHub Actions to build and test the development version of Matplotlib against a Pyodide wasm32 runtime, addressing any test failures due to current Pyodide limitations.
- [Bug]: constrained layout clips y-label above y-axis: This issue describes a bug in the Matplotlib library where the y-label is clipped when placed above the y-axis/spine while using constrained layout, although it displays correctly with tight layout or when positioned on the left. The problem persists across different plot configurations, including single and multiple plots, and the user has attempted various solutions such as adjusting vertical alignments and following layout guides without success, suggesting a potential bug in the constrained layout functionality.
- [Bug]: Matplotlib date2num timezone removal issue: This issue pertains to a bug in the Matplotlib library's
date2num
function, where a problem arises when handling lists containing both timezone-aware datetime objects and plain date objects, leading to anAttributeError
due to the inability ofdatetime.date
objects to use theastimezone
method. The bug is specifically triggered when the first item in the list is a timezone-aware datetime, and subsequent items are plain date objects, resulting in an unexpected error instead of the anticipated numerical array conversion. - [Bug]: Exported PDF figures cannot be modified by Adobe Illustrator correctly.: This issue describes a bug where figures generated using the
imshow
function in Matplotlib and saved as PDF files are not displayed correctly when opened in Adobe Illustrator, with colors being incorrectly assigned. The problem persists despite using the specified code and environment, including Matplotlib version 3.8.3 and Python version 3.10.13, and has been open for over a year without resolution.
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: 9
Summarized Issues:
- Deprecation of
ubuntu-20.04
GitHub Actions runner: The Matplotlib project plans to deprecate theubuntu-20.04
GitHub Actions runner in thetests.yml
workflow by March 2025 due to its nearing end of support. This issue suggests transitioning to newer Ubuntu versions to maintain compatibility and testing coverage.
- Bugs in Matplotlib scripts and functions: Several bugs have been identified in the Matplotlib library, including a
ValueError
intriage_tests.py
due to a missing baseline directory, and issues withinterpolation_stage="data"
causing excessive NaN propagation during image upsampling. Additionally, settinglines.markeredgecolor
inrcParams
affects errorbar cap colors, andtest_backend_pgf.py::test_rcupdate
fails due to an image comparison error on openSUSE Tumbleweed.
- Enhancements and improvements in Matplotlib: Proposed enhancements include improving installation guidance by updating outdated links and expanding the install guide, and suggesting that the
savefig
function should automatically close plots after saving. These improvements aim to enhance user experience and streamline workflows.
- ImportError with Qt bindings in Matplotlib: A user encounters an ImportError when running a basic Matplotlib example with PyQt6 and PySide6, despite having installed the necessary dependencies. This issue may be related to the development environment setup in a VSCode container, affecting the successful import of Qt binding modules.
- Discrepancies in LaTeX character rendering in SVG files: A bug in the Matplotlib library causes incorrect character sizing when saving plots with LaTeX-rendered characters as SVG files, while the same plots render correctly when displayed or saved as PDF files. This indicates a discrepancy in how LaTeX characters are handled across different output formats.
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:
- Filename Handling in Matplotlib: The
get_default_filename
function in Matplotlib has a bug where the zero character '0' is mistakenly replaced with an underscore '_'. This issue arises from a misinterpretation of the escape character, leading to incorrect file naming when plot titles contain '0'.
- Recursion Error in Matplotlib's Scatter Function: A recursion error occurs in Python 3.14 when using Matplotlib's
scatter
function, resulting in aRecursionError
due to exceeding the maximum recursion depth. This issue is particularly evident in certain environments like PyCharm and Marimo, but not when executed withuv run python3 main.py
.
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: 10
Key Open Pull Requests
1. MNT: ci: remove MacOS 'gobject-introspection' dependency: This pull request aims to remove the outdated 'gobject-introspection' dependency from the MacOS continuous integration setup, as its 'girepository' component has been migrated to 'glib', which is already a dependency of the 'gtk4' package, thereby resolving issues that have been blocking upgrades of the 'pygobject' library and ensuring the project remains up-to-date with the latest library versions.
- URL: pull/29777
- Merged: No
2. Fix log scaling for pcolor and pcolormesh: This pull request addresses issue #29615 by fixing the log scaling for pcolor
and pcolormesh
in Matplotlib, ensuring that data limits are handled appropriately by passing all values to update_datalim
, and includes code refactoring to de-duplicate limit setting in these functions without causing performance slowdowns.
- URL: pull/29783
- Merged: No
3. ci: Introduce ubuntu-24.04 to restore GTK test coverage with recent PyGObject versions: This pull request introduces an Ubuntu 24.04 test job in the GitHub Actions continuous integration workflow to restore GTK test coverage by addressing a system dependency issue with recent PyGObject versions, which is not available on Ubuntu 22.04, thereby improving test coverage for Linux GTK UI tests.
- URL: pull/29765
- Merged: No
Other Open Pull Requests
- Switching PEP8 compliance tool to ruff: This pull request proposes replacing
flake8
withruff
for PEP8 compliance checking in the Matplotlib project. The change aims to eliminate duplicate configurations and leverageruff
's ability to automatically fix many PEP8 violations, enhancing developer efficiency.
- New 'language' parameter in Text objects: A new 'language' parameter is introduced to Text objects and related APIs in Matplotlib, allowing specification of language settings to influence text layout. The implementation accepts a string or a list of tuples indicating language and text range, with potential adjustments to align with existing font feature syntax.
- Code simplification using C++17 CTAD: This pull request simplifies the code in the Agg and path processing pipeline by using C++17's class template argument deduction (CTAD). It eliminates the need for explicitly specifying template arguments, making nested templated object constructions more concise and natural.
- LaTeX dependencies update for TeX Live 2025: A list of LaTeX dependencies from a Fedora spec is added to address errors after updating to TeX Live 2025. This update potentially resolves issue #24646 by ensuring the 'minimal' LaTeX setup is included in the collections.
- Enhancements to interactive figures guide: The interactive figures guide is improved by relocating the "GUI events" paragraph to its own section for clarity. Additionally, the "Blocking the prompt" section is rephrased, and minor wording improvements are made, separate from ongoing work in another pull request.
- Filtering images in premultiplied alpha mode: This pull request addresses filtering images in premultiplied alpha mode to resolve rendering issues and improve visual output. It adjusts the conversion process between premultiplied and non-premultiplied alpha, as part of a broader effort to fix issue #29711 and related issues.
- Cheatsheets layout enhancement: The layout of the cheatsheets in the sidebar is enhanced by ensuring the image occupies the full width and aligning the heading with the top of the right-hand sidebar. The title is simplified to "Cheatsheets" by removing the redundant "Matplotlib" prefix, with a dependency on a related pull request for CSS styling adjustments.
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: 12
Key Closed Pull Requests
1. Add description to logit_demo.py script: This pull request adds a description to the logit_demo.py
script in the Matplotlib project to clarify how the logit scale is used for visualizing probabilities, thereby addressing the lack of explanation and aiding users in understanding how probability values are spread between 0 and 1 for comparing different distributions.
- URL: pull/29767
- Merged: Yes
2. Backport PR #29767 on branch v3.10.x (Add description to logit_demo.py script): This pull request involves backporting changes from PR #29767 to the v3.10.x branch of the Matplotlib project, specifically adding a description to the logit_demo.py
script, and it has been successfully merged.
- URL: pull/29768
- Merged: Yes
- Associated Commits: f8694
3. Backport PR #29767 on branch v3.10.1-doc (Add description to logit_demo.py script): This pull request involves backporting changes from PR #29767 to the v3.10.1-doc branch, specifically adding a description to the logit_demo.py
script in the Matplotlib project, and it has been successfully merged.
- URL: pull/29769
- Merged: Yes
- Associated Commits: 39133
Other Closed Pull Requests
- Moving IPython Test to Minver Tests: This topic involves moving a test for old IPython behavior to the minver tests to declutter the test matrix. It facilitates the transition to newer Ubuntu images and the dropping of Python 3.10 in the Matplotlib project.
- Backporting Documentation Changes for 'pixi' and 'uv' Packages: This topic covers backporting documentation changes to the v3.10.x and v3.10.1-doc branches of the Matplotlib project. The changes specifically add installation instructions for the 'pixi' and 'uv' packages.
- Escaping Nulls and "0" in Filenames: This topic addresses the issue of properly escaping nulls and "0" in default filenames by modifying non-GUI managers to store the window title. It includes a test to ensure the fix is effective and closes issue #29779.
- Simplifying Annotation Arrow Style Documentation: This topic involves backporting changes aimed at simplifying the documentation related to annotation arrow style references. The changes are applied to both the v3.10.x and v3.10.1-doc branches of the Matplotlib project.
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 | 42 | 8 | 3 | 40 |
anntzer | 5 | 4 | 4 | 20 |
dstansby | 21 | 4 | 3 | 4 |
jayaddison | 17 | 2 | 3 | 9 |
rcomer | 9 | 1 | 2 | 17 |
jklymak | 2 | 0 | 0 | 23 |
tacaswell | 6 | 1 | 0 | 15 |
No author found | 18 | 0 | 0 | 0 |
story645 | 5 | 1 | 0 | 12 |
QuLogic | 8 | 2 | 0 | 5 |