Weekly GitHub Report for Matplotlib: May 05, 2025 - May 12, 2025 (12:00:21)
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.
-
[Doc]: add histogram as colorbar example: This issue is about adding an example of a colorbar histogram to the documentation gallery of a GitHub project, as it is a popular visualization technique that can be somewhat tricky to implement. The user has provided a code snippet and an image to illustrate the concept, inviting others to contribute a potentially better example.
- The comments discuss the adequacy of the provided example, suggesting that it is already good but could be improved with a more interesting dataset. One commenter suggests omitting the colorbar since the histogram conveys the same information, while another agrees that the colorbar serves as a verification tool. There is also a suggestion to make the histogram bins more purposeful and to consider using a different dataset, such as an MRI dataset, for more engaging results.
- Number of comments this week: 4
-
[Bug]: Setting font.sans-serif is impossible by the intended way using matplotlib.rc because it contains a hyphen.: This issue highlights a bug in the Matplotlib library where setting the
font.sans-serif
parameter using thematplotlib.rc
function is problematic due to the presence of a hyphen in the parameter name, which is not allowed in named parameters. The user suggests that an alias should be created to allow easier setting of this parameter, similar to existing aliases in the library, as changing the parameter name might not be feasible due to its long-standing usage.- A commenter agrees that adding an alias for
sans-serif
is a reasonable feature and suggests that changing the parameter name is not viable due to its long history. They mention that the syntax error cannot be improved and express a preference for usingmpl.rcParams
overrc
for setting parameters. - Number of comments this week: 1
- A commenter agrees that adding an alias for
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 the Matplotlib library when used with categorical variables and thedensity=True
parameter, leading to incorrect density calculations due to the internal conversion of categories 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 them precisely at the center of the bars, and suggests improvements such as reconsidering density calculations for categorical data and providing clear 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 using
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. The user reports that when attempting to use "\limits" to adjust the placement of subscripts and superscripts in integral expressions, a ParseFatalException error occurs, indicating that the "\limits" command is not recognized by the parser.
- [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 a year, indicating a desire to improve the user interface by aligning the precision of log formatters with that of linear formatters, although a specific solution has not yet been proposed.
- [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 Parameter Naming Issue: The issue with setting the
font.sans-serif
parameter in Matplotlib arises from the hyphen in the parameter name, which is not allowed in named parameters. This suggests the need for an alias likesans
to facilitate easier configuration of font settings.
- Matplotlib Documentation Enhancement: There is a proposal to add an example to the Matplotlib documentation gallery to demonstrate creating a colorbar histogram. This example aims to provide a clear illustration of this popular visualization technique, with an invitation for contributions to improve the example or datasets used.
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: 3
Summarized Issues:
- Matplotlib Functionality Bugs: The Matplotlib library has encountered issues with its functions, leading to unexpected behavior. One issue involves the
ax.pie()
function crashing when provided with all-zero data due to a NaN to integer conversion error. Another issue arises when usingpyplot.subplots(layout="constrained")
, which results in two windows being displayed instead of one, deviating from the expected single window display.
- Matplotlib Documentation Error: There is a documentation error in the Matplotlib library concerning the
matplotlib.figure.Figure.subplots_adjust
function. The diagram incorrectly suggests that the "right" and "top" parameters are distances from the nearest subplot, whereas they should be distances from the zero coordinate of the figure, necessitating a correction to accurately reflect this.
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: 8
Key Open Pull Requests
1. merge up 3.10.3: This pull request involves merging various backported changes and updates from multiple previous pull requests into the main branch, including documentation improvements, bug fixes, test adjustments, and version updates, as part of the preparation for the release of version 3.10.3 of the project.
- URL: pull/30031
- Merged: No
- Associated Commits: 50cad, c38e0, 1bdc3, bf640, 365dd, b6f6e, 7bbf2, a2ed2, 6843f, f51d4, f098e, 01d66, 6bc61, 519b3, 3ac78, 5d628, d0ab4, 5090b, f8694, 90a5a, 89460, d4820, 2ddb3, 2736c, ac649, 00567, ba55b, a5691, 57878, 1e890, 64ff9, f5d67, 03590, 30817, 5fde1, ba588, b29bd, 282ef, 00b4d, 465d9, a4996, 2230a, 479ed, 4bf74, d8654, 6cab0, 877ec, 6c394, 7470a, 02c05, fe014, 34a11, 2673b, f7252, a5953, 6a6e8, 09bea, 7dfb4, d1c20, 110b6, 9a803, 59a97, 8a1ce, 9846a, 950f2, 495fb, 2322a, be0d1, cd67b, a64d4, 9f40c, 05953, 0ef11, acb73, 3b50d, 0ef15, 71e69, 8b827, e82b4, 0b02f
2. ENH: Add tick label alignment parameters to tick_params: This pull request introduces new parameters for horizontal and vertical alignment of tick labels in the tick_params
method, enhancing user convenience and consistency with other tick label properties by allowing direct control over label alignment, addressing issues #13774 and #20644, and including tests, documentation updates, and example usage.
- URL: pull/30009
- Merged: No
3. Add "sans" alias to rc() to allow users to set font.sans-serif: This pull request introduces a new alias, "sans," to the rc()
function in Matplotlib, allowing users to set the font.sans-serif
parameter more conveniently, addressing issue #30021, and includes updates to the documentation and tests to ensure the functionality works as intended.
- URL: pull/30030
- Merged: No
Other Open Pull Requests
- New Features in Matplotlib: This topic covers the introduction of new features in the Matplotlib library, such as setting a default aspect ratio for axes and default spine positions for axes. These features are implemented through the addition of new parameters in
rcParams
, addressing specific issues and incorporating feedback from previous attempts.
- Deprecation of Unused Parameters: The pull request under this topic focuses on deprecating unused parameters in the tricontour and tricontourf functions of Matplotlib. It includes the use of a decorator for handling the deprecation and provides documentation, testing, and examples to ensure compliance with contribution guidelines.
- External Resources Update: This pull request proposes the addition of the "Matplotlib Journey" online course to the external resources section. It seeks feedback on whether to clarify that the course is a paid resource, following discussions with contributors.
- Code Clarity Improvements: The pull request addresses the removal of a redundant cutout in the
PdfFile._embedTeXFont
method for missing font files. This change improves code clarity and maintains consistency with previous updates by relying on an earlier error raised in thedviFontName
function.
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: 18
Key Closed Pull Requests
1. FIX #30007: Raise ValueError when all wedge sizes are zero in ax.pie: This pull request addresses issue #30007 by implementing a change in the ax.pie
function of the Matplotlib library to raise a ValueError
when all wedge sizes are zero, thereby preventing the function from proceeding to a NaN conversion, and includes several commits for condition adjustments, test case additions, and linting fixes.
- URL: pull/30019
- Merged: 2025-05-06T09:46:53Z
2. 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 without affecting tests on other systems.
- URL: pull/29981
- Merged: No
3. Feature Implementation for "setting spine default location displacement rcParams" - DRAFT PR: This pull request is a draft implementation aimed at addressing issue #13930 by introducing a feature that allows users to set default outward positions for the top, left, right, and bottom spines of a plot using four new rcParams in the Matplotlib library.
- URL: pull/30011
- Merged: No
Other Closed Pull Requests
- Diagram Update in
subplots_adjust
Documentation: This topic involves updating the diagram in thesubplots_adjust
documentation to accurately depict parameters as distances from the edges of the figure. The updates ensure users have a clear understanding of how to control subplot layout, and these changes were backported to different branches for consistency.
- Pinned Windows Image Update on Azure: The pinned oldest Windows image on Azure was updated from windows-2019, which is set to be deprecated, to ensure compatibility and address potential timeout issues. These changes were backported to various branches to maintain consistency across the project.
- Deprecation and Removal of Functions: The Matplotlib project removed the deprecated
get_tick_iterator()
function and expired the deprecation ofnth_coord
arguments, both of which were deprecated in version 3.9. These removals are part of the ongoing maintenance and codebase improvement efforts.
- Linting and Code Cleanup: Linting was enabled for
.pyi
files, addressing issues like line length and unused imports, and an unused_api
import was removed after it became redundant. These changes improve code quality and maintainability.
- Micro-Optimization of
_to_rgba_no_colorcycle
Function: The_to_rgba_no_colorcycle
function was micro-optimized to enhance the speed of#rgba
-type format conversions by 25% to 40%. This optimization simplifies the implementation, although performance gains may be limited due to existing caching mechanisms.
- Deprecation of Unused Parameters in Tricontour Functions: The unused 'origin' and 'extent' parameters in the tricontour and tricontourf functions were deprecated by setting them to None, triggering a warning if they remain unset. This change includes related issue closure, testing, and documentation updates.
- Private Font Attributes in PdfFile Class: The font-related attributes of the PdfFile class were made private to indicate they are for internal use. This change allows for future modifications to support additional font types exposed by xetex/luatex.
- Meson-Python Version Pinning Removal: The pinning of the meson-python version was removed as version 0.18 is expected to restore symlink handling. This change includes a commit addressing the version update.
- Text Metric Calculations Consistency: Changes from PR #29907 were backported to ensure text metric calculations consistently utilize the text cache. This update was successfully merged to maintain consistency in text rendering.
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 | 27 | 3 | 4 | 30 |
QuLogic | 29 | 5 | 0 | 15 |
dstansby | 20 | 6 | 0 | 13 |
tacaswell | 18 | 1 | 0 | 14 |
rcomer | 9 | 2 | 0 | 12 |
jklymak | 6 | 1 | 0 | 14 |
anntzer | 9 | 6 | 0 | 6 |
Lynsoo | 13 | 0 | 0 | 0 |
CharlieThornton33 | 10 | 1 | 0 | 0 |
ebubekir-pulat | 8 | 3 | 0 | 0 |