Weekly Project News

Subscribe
Archives

Weekly GitHub Report for Matplotlib: June 09, 2025 - June 16, 2025 (12:05:26)

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
    • 1.2. Other Noteworthy Updates
  • II. Issues
    • 2.1. Top 5 Active Issues
    • 2.2. Top 5 Stale Issues
    • 2.3. Open Issues
    • 2.4. Closed Issues
    • 2.5. Issue Discussion Insights
  • III. Pull Requests
    • 3.1. Open Pull Requests
    • 3.2. Closed Pull Requests
    • 3.3. Pull Request Discussion Insights
  • IV. Contributors
    • 4.1. Contributors

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 improvements in image handling, security enhancements by removing md5 usage, and fixes for plot positioning and rendering. Additionally, it introduces a version gate for GTK4 calls and raises warnings for specific scatter plot configurations, alongside various 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.

  1. [ENH]: Expand and diversify built-in style gallery: This issue highlights the need to expand and diversify the built-in style gallery in Matplotlib, which currently offers a limited selection of styles predominantly featuring light-toned backgrounds and only one dark theme. The proposed solution suggests introducing a broader range of styles, including multiple dark themes and diverse light options, to enhance user experience and adaptability for various presentation contexts and dark-mode environments.

    • The comments discuss the feasibility of expanding Matplotlib's style offerings, with suggestions for community collaboration to create curated styles and the potential for a central repository for community styles. There is support for third-party contributions and existing tools that could facilitate style creation, but concerns are raised about the core team's capacity and the subjective nature of aesthetics. The discussion also touches on technical aspects of style integration and the potential benefits of a style registry, while emphasizing the advantages of third-party packages for more flexible and targeted style development.
    • Number of comments this week: 13
  2. [Bug]: Removing spines in polar plot causes distortion of the plot: This issue involves a bug in the Matplotlib library where removing grid lines from a polar plot using ax.set_xticks([]) or similar methods results in a distorted plot. The user provides a code snippet to reproduce the issue and highlights the difference between the actual and expected outcomes, seeking a solution to maintain the plot's integrity without grid lines.

    • The comments discuss a similar issue previously fixed, suggesting that PolarAxes.set_yticks should be wrapped into a RadialLocator like set_rticks. There is a proposal to unify set_yticks and set_rticks, and a deeper solution involving RadialAxis is suggested, with a focus on ensuring the locator is always wrapped in a RadialLocator. A helper function for wrapping is mentioned, and clarification is sought on its necessity.
    • Number of comments this week: 4
  3. [Bug]: Calling axes.clear() on a shared y or x-axis issues an unexpected warning with log scale: This issue describes a bug in the Matplotlib library where calling axes.clear() on a shared y-axis or x-axis results in unexpected warnings when using a logarithmic scale. The problem occurs when plotting data in a non-standard order, specifically when the first plot is created in the second column and then in the first column, which triggers warnings about setting non-positive limits on a log-scaled axis and identical low and high y-limits.

    • The comments discuss additional scenarios where the issue arises, noting that the warning only appears when the first axes in a grid is cleared. It is suggested that the bug might be related to shared y-scales not being handled correctly, and a potential link to a previous issue (#27825) is mentioned.
    • Number of comments this week: 3
  4. [Bug]: Stackplot in SubFigure raises when drawing Legend: This issue involves a bug in the Matplotlib library where calling fig.legend() on a main figure containing subfigures with stackplots results in a runtime error, specifically stating that a single artist cannot be placed in more than one figure. The error does not occur when using other plotting functions like ax.plot or ax.scatter, indicating a specific problem with stackplots in this context.

    • A workaround was suggested by proxying all artists to avoid the error, and another comment speculated that the issue might be related to how the figure is set in the legend handler, though this has not been confirmed through debugging.
    • Number of comments this week: 2
  5. [MNT]: pyplot type hints: This issue discusses the use of *args and **kwargs in some functions within pyplot.py, such as show, figlegend, and savefig, which results in untyped parameters. The proposed solution suggests specifying the actual function signatures or type parameters using Unpack[TypedDict] and Unpack[tuple], although this approach may lead to the loss of parameter names.

    • The comments explain that *args and **kwargs are used in some functions as shorthand for passing parameters, with some signatures being auto-generated. It is suggested that for better typing, one might consider using the explicit Axes API instead of the implicit pyplot API, especially when writing scripts or library code.
    • Number of comments this week: 2

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.

  1. [Bug]: Misalignment of Labels and Incorrect Density Values in ax.hist() for Categorical Variables: This issue highlights a bug in the ax.hist() function when used with categorical variables and the density=True parameter, where the density values are incorrectly computed due to the internal conversion of categories to integers, leading to miscalculated densities as the bin width isn't necessarily 1. 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.
  2. [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 or make html-skip-subdirs, often resulting in numerous unhelpful warnings. The proposed solution involves updating the documentation and configuration settings to streamline the process, making it more accessible for developers, especially beginners, who need to frequently preview individual gallery entries.
  3. [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, it is not recognized by the module, leading to an error when rendering the expression.
  4. [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 what has been implemented for linear formatters. The problem has been open for over 430 days, and while a solution has not yet been proposed, it highlights a gap in the current functionality of log formatters compared to their linear counterparts.
  5. [Bug]: ax.transData does not honor data limits: This issue highlights a bug in Matplotlib where the ax.transData transformation does not automatically update to reflect changes in data limits (xlim and ylim) when new data is added to the axes, 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 suggests either updating the documentation to clarify this behavior or modifying the functionality to ensure transData always uses the latest data limits.

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:

  • Built-in Styles Expansion: The need to expand and diversify the limited selection of built-in styles in Matplotlib is addressed by introducing a broader suite of ready-to-use styles. This includes multiple dark themes and visually diverse light options to enhance user experience, particularly for dark-mode environments.
    • issues/30157
  • Legend and Plotting Bugs: Several bugs in Matplotlib involve issues with legends and plotting functions. Using fig.legend() on a main figure with subfigures causes a RuntimeError, and axes.clear() on shared axes results in warnings with logarithmic scales. Additionally, removing spines in polar plots distorts the plot, and transformed vertices of an ellipse appear incorrectly scaled.
    • issues/30158, issues/30164
  • Untyped Parameters in Functions: The use of untyped parameters in certain functions within pyplot.py of Matplotlib is questioned, particularly the reliance on *args and **kwargs. The proposal suggests specifying actual type signatures to improve type hinting, despite challenges with dynamic signatures.
    • issues/30160
  • Documentation and Style Application Issues: Documentation and style application issues in Matplotlib include a misdirected FAQ link on the Tutorials page and inconsistent style updates in Jupyter Notebooks. The FAQ link incorrectly points to the Python FAQ, and plt.style.context does not apply styles consistently compared to plt.style.use.
    • issues/30169, issues/30170
  • Anaconda Wheel Upload Failure: The nightly Anaconda wheel upload process for Matplotlib has been failing due to an authentication token lacking the necessary scope. This has resulted in a 401 error, preventing successful uploads for several weeks.
    • issues/30173

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 RuntimeWarning on Windows with NumPy 2.3: A test pipeline failure occurs on Windows for the Matplotlib project due to a RuntimeWarning triggered by an invalid value in the np.spacing function. This issue is possibly related to the recent release of NumPy 2.3, indicating a compatibility problem that needs addressing.
    • issues/30152
  • Difficulty with Inset Axes Coordinates in Matplotlib: Users face challenges in obtaining the x, y coordinates of the inset axes (axins) border when using inset_axes from mpl_toolkits.axes_grid1.inset_locator. A helper function was proposed to simplify this process, but it was noted that the existing indicate_axes_zoom feature already provides the desired functionality.
    • issues/30176

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: 9

Key Open Pull Requests

1. Font and text overhaul: This pull request is focused on a comprehensive overhaul of fonts and text within the Matplotlib project, consolidating all related changes into a single PR to manage test image updates efficiently without overwhelming the main repository, and it includes updates such as fixing the center of rotation with rotation_mode='anchor' and updating test images.

  • URL: pull/30161
  • Merged: No
  • Associated Commits: c44db, f1cdc, 04589

2. Remove fallback code for glyph indices: This pull request aims to remove the fallback code for glyph indices in the Matplotlib project, as glyph indices are specific to each font and using a fallback based on glyph index could lead to incorrect character rendering, with the change being internal to the extension and not affecting any existing functionality.

  • URL: pull/30168
  • Merged: No
  • Associated Commits: 41cc9, 1c722

3. Fix the misplacement of rasterized object in DrawingArea in the vectorized backends: This pull request addresses a bug in the DrawingArea class of the vectorized backends by implementing a fix that ensures correct DPI transformation during the rasterization of Artists, thereby preventing their misplacement, and it includes enhancements to the renderer support and simplification of logic for checking vector renderers, as detailed in the commits linked to the issue #28549.

  • URL: pull/30171
  • Merged: No
  • Associated Commits: df3c5, f8707

Other Open Pull Requests

  • Image Scaling Consistency: This topic focuses on ensuring consistent image scaling to the edges of axes in Matplotlib. The pull request removes the different handling between nonaffine and affine transforms, eliminating gaps caused by fractional pixels when using nonaffine transforms.
    • pull/30175
  • Font Configuration Enhancements: The pull requests under this topic introduce and address font-related features in Matplotlib. One introduces support for the font.superfamily rcParam, allowing users to define logical font groups, while another ensures that the fontsize parameter is applied correctly across different plots.
    • pull/30155, pull/30166
  • Module Structure Simplification: This topic involves simplifying the structure of the matplotlib.style module. The pull request deprecates the matplotlib.style.core package and consolidates the implementation into a single module, re-exporting USER_LIBRARY_PATHS directly in matplotlib.style.
    • pull/30163
  • Documentation and Symbol Table Improvements: Enhancements in documentation and symbol tables are covered under this topic. The pull request implements dynamically sized math symbol tables, addressing and closing a specific issue in the Matplotlib project.
    • pull/30172
  • RadialAxis Locator Wrapping: This topic addresses the consistent wrapping of Locators on RadialAxis in Matplotlib. The pull request implements all wrapping logic whenever a new locator is set, closing a related issue and rearchitecting previous changes.
    • pull/30174

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: 5

Key Closed Pull Requests

1. Fix typo in backend_ps.py comment: change 'and them scale them' to 'and then scale them': This pull request addresses a grammatical error in the comments of the backend_ps.py file by correcting the phrase "and them scale them" to "and then scale them" to enhance the clarity and accuracy of the documentation without affecting the code's functionality.

  • URL: pull/30151
  • Merged: Yes
  • Associated Commits: 51bc2

2. Throw exception when alpha is out of bounds: This pull request ensures that a ValueError is raised when the 'alpha' parameter is outside the valid range [0, 1], thereby preventing silent failures and enforcing proper input validation in the Matplotlib project.

  • URL: pull/30153
  • Merged: Yes
  • Associated Commits: 0ee8e

3. Add files via upload: This pull request involves adding a three-way handler to manage alpha channel data in images, allowing for the stacking of a 2D mask as a new channel, broadcasting a scalar alpha across the alpha channel, or leaving the image's alpha untouched if no alpha is provided, and includes a standalone script for isolating the issue by creating a random 10x10 array.

  • URL: pull/30156
  • Merged: No
  • Associated Commits: 3998f

Other Closed Pull Requests

  • Runtime Error Fix for NaN Input in format_cursor_data: This topic addresses a runtime error related to NaN input in the format_cursor_data function, which became apparent with the release of NumPy 2.3.0 on Windows. The pull requests ensure that the test consistently catches this issue and include backporting changes to the v3.10.x branch to maintain consistency across versions.
    • pull/30162, pull/30167

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
jklymak 1 1 3 25
story645 4 0 0 26
anntzer 9 7 0 5
timhoffm 3 1 1 16
QuLogic 8 3 0 4
rcomer 1 0 0 9
matthewfeickert 4 0 2 2
MiniX16 6 1 0 0
oscargus 2 2 1 2
jkseppan 6 1 0 0

Don't miss what's next. Subscribe to Weekly Project News:
Powered by Buttondown, the easiest way to start and grow your newsletter.