Weekly Project News

Subscribe
Archives

Weekly GitHub Report for Matplotlib: April 07, 2025 - April 14, 2025 (14:10:29)

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 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.

  1. [Bug]: image alpha re-applied each draw?: This issue reports a bug in the Matplotlib library where an RGBA image becomes progressively darker when the GUI window is resized repeatedly. The problem is traced back to a specific commit and is believed to be related to the way the image's alpha channel is being handled during rendering.

    • The comments discuss the potential cause of the issue, suggesting that the problem arises from in-place multiplication of the RGBA array. A specific line in the code is identified as the source, and a proposed fix involves adjusting the array manipulation. A contributor confirms the diagnosis and plans to create a pull request to address the issue.
    • Number of comments this week: 5
  2. [Bug]: \right) is replaced with exclamation mark when using fontset='cm': This issue describes a bug in the Matplotlib library where the right parenthesis in certain LaTeX expressions is incorrectly replaced with an exclamation mark when using the 'cm' fontset. The problem occurs specifically when both the upper and lower bounds of an integral are set, and it does not affect other mathematical symbols like (\sum) or (\iint).

    • Several users attempted to reproduce the issue, with mixed results. Some users could not replicate the problem, while others confirmed its occurrence on different systems and configurations. The discussion also included inquiries about the installation method of LaTeX, which might influence the bug's manifestation.
    • Number of comments this week: 4
  3. [Bug]: plt.show() works intermittently in PyCharm: This issue describes a bug where the matplotlib.pyplot.show() function behaves inconsistently in PyCharm, sometimes failing to display plots even though the script runs without errors. The problem is linked to the use of the 'Agg' backend, which is non-interactive and does not support GUI windows, leading to a UserWarning when attempting to display plots.

    • A commenter suggests that the issue arises from the 'Agg' backend being selected, which lacks GUI support, and recommends switching to a different backend like 'qtagg' to resolve the problem. They also mention that PyCharm might have its own backend, possibly available only in the Pro version, and advise checking the current backend with mpl.get_backend().
    • Number of comments this week: 1
  4. [Doc]: Autoscaling Axes or Autoscaling Axis?: This issue highlights a discrepancy in the documentation of a project where the terms "Autoscaling Axes" and "Autoscaling Axis" are used inconsistently, causing confusion. The user suggests that the documentation should consistently use "Autoscaling Axis" and seeks clarification on whether there is a difference between the two terms.

    • A commenter expresses interest in addressing the issue and requests guidance on how to proceed with the task.
    • Number of comments this week: 1

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.

  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 of Matplotlib when used with categorical variables and the density=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 aligning x-ticks and understanding the category-to-integer conversion.
  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 to provide clearer guidance on building individual files and suggests modifications to the conf.py configuration to streamline the process, thereby making it more accessible for developers, especially beginners, who need to frequently preview their work.
  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 leads to a parsing error when used in matplotlib version 3.8.4 on a Windows operating system.
  4. [ENH]: Fix precision displayed by LogFormatter.format_data_short: This issue addresses the need to enhance the LogFormatter in the Matplotlib library to display mouse cursor values with a precision that matches the cursor pointing accuracy, similar to the existing functionality for linear formatters. The current lack of this feature in log formatters is identified as a gap, and implementing it would improve the consistency and usability of the tool.
  5. [Bug]: ax.transData does not honor data limits: This issue highlights a bug in the Matplotlib library 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 a manual update of data limits using methods like set_xlim and set_ylim, which is not clearly communicated in the documentation, leading to confusion and unexpected behavior in data coordinate transformations.

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:

  • Rendering issues in Matplotlib with LaTeX expressions: A bug in the Matplotlib library causes the right parenthesis in certain LaTeX expressions to be incorrectly rendered as an exclamation mark when using the 'cm' fontset. This issue specifically occurs when both upper and lower bounds are set for an integral, while other mathematical symbols like (\sum) or (\iint) do not exhibit this problem.
    • issues/29886
  • Image rendering issues in Matplotlib: When plotting an RGBA image in Matplotlib and resizing the GUI window, the image progressively darkens. This is likely due to the alpha channel being incorrectly re-applied with each redraw, traced back to a specific code change.
    • issues/29891
  • Inconsistencies in Matplotlib documentation: The Matplotlib documentation contains a discrepancy where "Autoscaling Axes" is used in the navigation, while "Autoscaling Axis" appears on the document page. This inconsistency suggests that the terminology should be consistent and clarified throughout the documentation.
    • issues/29906
  • Code redundancy in Matplotlib's figure.py file: The figure.py file in the Matplotlib project has a redundancy where the set_dpi and get_dpi functions are defined twice. If there is no valid reason for this duplication, one set of these functions should be removed to clean up the code.
    • issues/29909

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

Summarized Issues:

  • Backward Compatibility in Matplotlib's draw_quad_mesh: The draw_quad_mesh function in Matplotlib has a bug related to backward compatibility with third-party backends like mplcairo. This issue arises because these backends do not support the hatchcolors keyword argument, resulting in a TypeError when used, and it is suggested that the hatchcolors parameter might be unnecessary for QuadMesh as it does not support hatching.
    • issues/29883

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

Key Open Pull Requests

1. Show subprocess stdout and stderr on pytest failure: This pull request aims to enhance the debugging process by displaying the captured stdout and stderr outputs when a pytest test that utilizes the subprocess helper fails, thereby providing more detailed information for diagnosing test failures.

  • URL: pull/29890
  • Merged: No
  • Associated Commits: 443d4, 846b8, a8e29, b43b5, 79ddf, bc30c, 98e5f, 502ee

2. API: bump minimum supported version of Python and numpy: This pull request proposes to update the minimum supported versions of Python to 3.11 and NumPy to 1.25 for the next release of the Matplotlib project, in line with the project's policy, and includes documentation updates and build adjustments to reflect these changes.

  • URL: pull/29904
  • Merged: No
  • Associated Commits: 0028f, 008bc, 3c436, 27b30, 6719a

3. The 'lines.markeredgecolor' now doesn't interfere on the color of errorbar caps : This pull request addresses a bug (Fixes #29780) by ensuring that the color of error bar caps in Matplotlib is no longer affected by the global 'lines.markeredgecolor' setting, allowing the caps to use the specified 'ecolor' independently, with changes made to the _axes.py and test_axes.py files.

  • URL: pull/29895
  • Merged: No
  • Associated Commits: 469fa, 9b98c, 746a0

Other Open Pull Requests

  • Type Annotation and Mismatch Issues: Several pull requests address type-related issues in the Matplotlib project. One pull request changes the expected argument type in the plt.subplot_mosaic function to resolve compatibility errors with type checkers. Another pull request resolves a type mismatch issue by aligning types for width and height with BufferRegion definitions to fix a narrowing error identified by clang.
    • pull/29893, pull/29894
  • Error Handling in Functions: Pull requests have been made to improve error handling in Matplotlib functions. The errorbar function was updated to handle masked negative errors without exceptions, refining logic to support astropy's Masked arrays and prevent RuntimeError from nan < nan comparisons.
    • pull/29897
  • Image Processing Enhancements: Enhancements to image processing in Matplotlib are addressed in multiple pull requests. One ensures that black corners do not appear when rotating RGB images by converting them to RGBA format, while another ensures the make_image function does not modify the original array when dividing RGB by alpha, maintaining efficiency by copying only when necessary.
    • pull/29887, pull/29892
  • Text and Font Metrics Improvements: Improvements to text and font metrics in Matplotlib are covered by several pull requests. One uses text placeholders to prevent font metrics from affecting tests with empty legend labels, while another ensures text metric calculations consistently use the text cache by modifying calls outside the Text class.
    • pull/29908, pull/29907
  • Backporting and Test Consistency: A pull request focuses on backporting changes to the v3.10.x branch, specifically using placeholders for text in layout tests. This aims to improve test consistency and maintainability by ensuring that tests are not influenced by variable text metrics.
    • pull/29901

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

Key Closed Pull Requests

1. Use ruff instead of flake8 to check PEP8: This pull request involves switching the PEP8 compliance checking tool from flake8 to ruff in the Matplotlib project, primarily to eliminate the need for maintaining duplicate configurations and to leverage ruff's capability to automatically fix many PEP8 violations, thereby enhancing developer efficiency.

  • URL: pull/29762
  • Merged: 2025-04-09T22:38:18Z
  • Associated Commits: accaf, 0eaee

2. MVP of testing figures using hash comparison: This pull request introduces a minimum viable product for testing figures using hash-based comparison instead of direct figure comparison, aiming to validate the feasibility of this approach on continuous integration systems with the help of pytest-mpl, as part of addressing an issue in the Matplotlib project.

  • URL: pull/29823
  • Merged: No
  • Associated Commits: 22136, f26a9

3. DOC: Improve FancyArrowPatch docstring: This pull request involves enhancing the documentation by improving the docstring for the FancyArrowPatch class in the Matplotlib library, as indicated by the commit message and the successful merge on April 9, 2025.

  • URL: pull/29803
  • Merged: 2025-04-09T00:08:27Z
  • Associated Commits: cd653

Other Closed Pull Requests

  • Layout Tests Modification: This pull request introduces a modification to the layout tests in the Matplotlib project by using placeholders for text. It involves patching the Text object to draw a rectangle instead of relying on font properties, ensuring that tests remain consistent across different font settings.
    • pull/29872
  • FancyArrowPatch Docstring Backporting: These pull requests involve backporting improvements to the FancyArrowPatch docstring from a previous pull request (#29803) to different branches of the Matplotlib project. This ensures that documentation enhancements are consistent across different versions.
    • pull/29888, pull/29889
  • Array API Compatibility: These pull requests update the lib/matplotlib/cbook.py file by replacing the .T attribute with the .transpose() method in the _reshape_2D function. This change ensures compatibility with the Array API and prevents multiple warnings in the NumPy documentation check CI job.
    • pull/29896, pull/29900
  • Type Checking Improvement: This pull request addresses the issue of type checkers complaining when a function f: Callable[[PickEvent], Any] is passed to mpl_connect("pick_event", f). It adds @overload annotations to the FigureCanvasBase.mpl_connect() method, improving type checking compatibility with tools like pyright.
    • pull/29898
  • Basic Units Documentation: These pull requests aim to minimally document the functionality of the "basic units" feature in the Matplotlib library. They add a brief explanation to help users understand that it implements a mini library, allowing those who do not need it to avoid delving into the code unnecessarily.
    • pull/29899, pull/29902, pull/29903
  • Removal of Unsupported Parameter: This pull request removes the hatchcolors parameter from the draw_quad_mesh() function in the Matplotlib library. The QuadMesh class does not support hatching, and this change addresses and fixes issue #29883.
    • pull/29905

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 28 3 6 46
jayaddison 47 1 5 5
anntzer 15 4 3 31
QuLogic 14 6 0 17
dstansby 15 3 0 9
jklymak 4 1 3 18
rcomer 4 1 2 17
trygvrad 4 2 0 11
tacaswell 6 1 0 9
story645 3 2 0 5

Access Last Week's Newsletter:

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