Weekly Project News

Subscribe
Archives

Weekly GitHub Report for Matplotlib: April 21, 2025 - April 28, 2025 (12:00:30)

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

  1. [Bug]: numerical instability of Path.arc for 0 degree or 360 degree arc: This issue addresses a bug in the Matplotlib library where creating an arc path of 0 or 360 degrees can result in unexpected behavior due to floating point inaccuracies, causing arcs to sometimes appear as full circles or empty arcs. The user suggests that the documentation should clarify the expected behavior of arcs, particularly when theta2 is less than theta1, and proposes either updating the docstring or raising a ValueError for unexpected inputs to improve clarity and prevent numerical instability.

    • The comments discuss the current behavior of the arc function, with suggestions to clarify the documentation and possibly allow arcs greater than 360 degrees. There is a debate on whether the function should handle arcs beyond a full circle and how to manage numerical tolerances. Some contributors propose changes to the function's implementation to address these issues, while others suggest maintaining the current behavior to avoid breaking existing functionality.
    • Number of comments this week: 12
  2. [MNT]: Python 3.14.0a7 test failures: This issue reports test failures in the Matplotlib project when running tests with Python 3.14.0a7, specifically after applying a certain fix from a previous pull request. The failures include image comparison mismatches and memory leak assertions, indicating potential compatibility issues with the new Python version and possibly with NumPy optimizations.

    • The comments discuss a known NumPy optimization issue affecting Python 3.14, suggesting waiting for a fix before addressing downstream library issues. A user tested Matplotlib with a patched NumPy version, resolving most issues except for genuine Matplotlib problems. The discussion includes suggestions to adjust tests to account for changes in reference counting behavior across Python versions.
    • Number of comments this week: 4
  3. [ENH]: add_collection(..., autolim=True) should update view limits as well: This issue addresses the enhancement of the Axes.add_collection() function in Matplotlib to automatically update the view limits when the autolim parameter is set to True, as it currently only updates the data limits, requiring users to make an additional call to ax.autoscale_view(). The proposed solution suggests that Axes.add_collection(..., autolim=True) should internally call ax._request_autoscale_view() to streamline the process and potentially include view limits handling, with a note to investigate the implementation for 3D plots.

    • The comments discuss whether this issue is similar to another one, with a response indicating that it is, and mentioning the initiation of a related issue to explore the solution further.
    • Number of comments this week: 2

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 plotting labels correctly due to the lack of 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 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.
  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, as demonstrated by the provided code and error message.
  4. [ENH]: Fix precision displayed by LogFormatter.format_data_short: This issue addresses the need to enhance the LogFormatter in a GitHub project by fixing the precision of values displayed, ensuring they match the cursor pointing precision, similar to the existing functionality for linear formatters. The problem has been open for over a year, and while a solution has not yet been proposed, it highlights a gap in the current implementation that affects the display of mouse cursor values in the toolbar.
  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), contrary to what the documentation suggests. As a result, users must manually trigger updates to the data limits to ensure that ax.transData uses the latest data, which can lead to confusion and unexpected behavior in data visualization.

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:

  • Matplotlib Arc Path Rendering Issues: This issue highlights a bug in the Matplotlib library where creating an arc path with angles of 0 or 360 degrees can result in unexpected behavior due to floating-point precision errors. These errors lead to arcs that are incorrectly rendered as full circles or empty, suggesting a need to clarify the documentation or raise a ValueError for unexpected inputs.
    • issues/29953
  • Matplotlib Autoscaling Functionality: This issue addresses the need for the Axes.add_collection(..., autolim=True) function in Matplotlib to automatically update the view limits (Axes.viewLim) in addition to the data limits (Axes.dataLim). The current implementation requires an additional call to ax.autoscale_view() or the use of the private method ax._request_autoscale_view(), which is cumbersome for users and lacks support for 3D plots.
    • issues/29957
  • Matplotlib Test Failures with Python 3.14.0a7: This issue involves test failures in the Matplotlib project when running tests with Python 3.14.0a7, where several image comparison tests fail due to discrepancies in expected and actual images. Some tests encounter runtime warnings and assertion errors, potentially linked to a NumPy optimization issue that affects temporary elision, with a suggestion to wait for a specific NumPy pull request to be merged to address these failures.
    • issues/29959
  • Matplotlib FuncAnimation Type-Checking Problem: This issue highlights a type-checking problem in the FuncAnimation function of Matplotlib, where type checkers like MyPy incorrectly flag a function returning None as incompatible when used as a parameter. Despite the code executing correctly when blit=False, a potential solution involves the use of overload and Literal for the blit argument.
    • issues/29960

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

Summarized Issues:

  • Error Handling in Matplotlib Functions: The matplotlib.pyplot.pie() function raises a ValueError when input data contains NaN, indicating a need for better error handling or documentation. Similarly, an AttributeError occurs with the 'side' attribute of violin plots in Matplotlib 3.9, suggesting environmental setup issues rather than a bug.
    • issues/29860, issues/29924
  • Matplotlib Plot Customization Issues: Users face challenges with linestyle customization in pyplot.hist when using histtype='step', as lines default to 'solid' instead of the specified style. Additionally, histogram plots using float32 precision with a logarithmic scale miss small data points, likely due to precision limitations in NumPy.
    • issues/29955, issues/29963
  • Installation and Compatibility Problems: Installing Matplotlib on Windows 10 x86 with Python 3.13.3 fails due to a build error with the kiwisolver wheel, likely because of missing pre-built wheels for 32-bit systems. Downgrading to Python 3.11 is suggested to use older package versions that support 32-bit Windows.
    • issues/29961
  • Documentation and Usability Enhancements: The lack of clear documentation for the "spines" object in matplotlib.axes.Axes suggests a need for better references or converting "spines" into a property. Additionally, users struggle with making tick labels reappear after isolating previously shared axes, especially in non-rectilinear geoplots.
    • issues/29942, issues/29964

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

Key Open Pull Requests

1. fix FuncAnimation class: This pull request addresses the need to fix the FuncAnimation class by ensuring that the update function passed to it matches the expected signatures, thereby preventing type errors and runtime issues such as freezing or crashing, and it includes updates to the typing to reflect different return types required by FuncAnimation depending on the blit parameter, as well as compliance with testing and documentation guidelines.

  • URL: pull/29968
  • Merged: No
  • Associated Commits: 38959, 1905d, 78713, 6063d, 5a79c, c448f, b142a, 81e2c, b32dd, c2895

2. FIX: update arc to do better rounding and allow wrap: This pull request addresses numerical instability issues in arc rounding as described in issue #29953, introduces an optional wrap feature for handling larger arcs while maintaining the original behavior as default, updates the docstring for Numpy compatibility, and clarifies documentation regarding arc directionality, ensuring arcs always proceed counterclockwise.

  • URL: pull/29962
  • Merged: No
  • Associated Commits: 14d54, a4d81

3. Fix Cursor widget drawing behavior with blitting support: This pull request addresses the inefficiency in the Cursor widget's redrawing behavior when the mouse moves out of the axis by implementing blitting support, thereby enhancing the performance and responsiveness of the widget in the Matplotlib library.

  • URL: pull/29971
  • Merged: No
  • Associated Commits: 37004, 09a03

Other Open Pull Requests

  • Enhancements to Matplotlib's ax.add_collection and Autoscaling: This pull request improves the ax.add_collection(..., autolim=True) feature by automatically updating view limits, removing the need for explicit autoscale calls. It maintains current behavior for 3D Axes with a temporary private value and suggests future improvements for related issues.
    • pull/29958
  • Handling of AxesWidgets in Matplotlib: This pull request resolves issues with AxesWidgets associated with "inset_axes" that are positioned outside their parent axes. It improves the recomputation logic to ensure events are correctly reparented, preventing exceptions in such scenarios.
    • pull/29966
  • Resilience of Refcount Tests in Matplotlib: This pull request enhances the resilience of refcount tests by checking changes in reference count rather than absolute values. This approach better accommodates potential changes in future Python versions.
    • pull/29970
  • Improvement of Mathtext Internal Structures Representation: This pull request improves the repr of mathtext boxes for debugging by displaying them more clearly, rather than in a single line. It also includes a minor cleanup by removing unnecessary nonlocal declarations in nested functions.
    • pull/29972

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

Key Closed Pull Requests

1. fix FuncAnimation class: This pull request addresses the need to fix the FuncAnimation class by ensuring that the update function passed to it matches the expected signatures, thereby preventing type errors and runtime issues such as freezing or crashing, and includes updates to the typing to reflect different return types required by FuncAnimation depending on the blit parameter, as well as tests, examples, and documentation updates to support these changes.

  • URL: pull/29967
  • Merged: No
  • Associated Commits: ea868, 3c62f, 6e4b6, f39ac, e2ec1, 3999c

2. Handled non finite values in ax.pie - issue #29860: This pull request addresses issue #29860 by ensuring that the pie() function in lib/matplotlib/axes/_axes.py raises a clear value error message when non-finite values, such as infinite or NaN, are present in the input data, and includes a new test, test_pie_non_finite_values(), to verify this functionality.

  • URL: pull/29873
  • Merged: 2025-04-24T21:49:33Z
  • Associated Commits: a1295, a5c1d, 5ddcb

3. Simplify colored_line() implementation in Multicolored lines example: This pull request simplifies the colored_line() implementation in the Multicolored lines example by reducing the number of lines, eliminating the use of non-array-api compatible Numpy functions to improve readability, calling autoscale_view to remove the need for manual set_xlim calls, and adding stacklevel=2 in warnings.warn, while also providing a dedicated package for this function.

  • URL: pull/29954
  • Merged: 2025-04-22T15:49:41Z
  • Associated Commits: 47e4a, 10d30, 05c62

Other Closed Pull Requests

  • Backporting Changes to v3.10.x Branch: This topic involves backporting changes to the v3.10.x branch of the Matplotlib project. The pull requests focus on using placeholders for text in layout tests to improve test consistency and maintainability, and backporting the documentation of Axes.spines to ensure relevant updates are included in this version branch.
    • pull/29901, pull/29969
  • Updating Continuous Integration Setup: These pull requests address the update of the continuous integration setup by removing the soon-to-be-unsupported GitHub Actions ubuntu-20.04 runner. They involve manual backports to different branches, resolving conflicts due to additional lines in the main branch.
    • pull/29949, pull/29950
  • Documentation and Build Process Improvements: This topic covers improvements in the documentation and build process for the Matplotlib project. The pull requests include cherry-picking a specific commit to maintain consistency in the documentation build process and adding a docstring to a class-level type hint for Axes.spines.
    • pull/29951, pull/29965
  • Enhancements to Matplotlib Library: These pull requests introduce enhancements to the Matplotlib library. They include the introduction of a HandlerPatchCollection for PatchCollection objects to appear in legends and updates to the GridSpec.update method to use an explicit signature and change error types for invalid keyword arguments.
    • pull/29952, pull/29956

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 19 4 7 46
QuLogic 14 4 0 18
rcomer 6 4 1 22
jklymak 10 1 2 19
anntzer 10 4 1 14
dstansby 9 0 0 16
tacaswell 13 1 0 11
trygvrad 4 2 0 11
Lynsoo 13 2 0 1
jayaddison 5 1 2 2

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