Weekly GitHub Report for Matplotlib: July 28, 2025 - August 04, 2025 (12:03:32)
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 of the 3.10.x series addresses multiple issues including improved handling of array alpha in interpolation, removal of md5 to support FIPS-enabled systems, fixes for pyplot.matshow and Axes position modifications, adjustments to polar plot titles, and added version gating for GTK4 calls, alongside documentation enhancements. Notably, it also introduces a warning when both color parameters are used in scatter plots, reflecting a focus on stability and user guidance.
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.
-
[Bug]: Type hints for xy and xycoords in annotate are too strict: This issue addresses the problem that the type hints for the
xy
andxycoords
parameters in theAxes.annotate
method are too restrictive, only allowing tuples of floats, which causes type checker errors when using datetime-like objects commonly employed on time-based axes. Although the code runs correctly at runtime, static type checkers like mypy and basedpyright flag errors because they expect strictly float tuples, and the discussion suggests relaxing the type hints to avoid false positives despite some loss of type safety.- The comments explain that matplotlib’s runtime behavior is type unstable for these parameters, accepting datetime objects when units are set but requiring floats otherwise, making precise static typing difficult. Contributors agree that relaxing the type hints, potentially to
Any
, is the practical solution to prevent erroneous type errors, while acknowledging this may allow some incorrect usage to pass type checks; related issues with other plotting methods likeax.arrow
are noted but considered less critical. - Number of comments this week: 4
- The comments explain that matplotlib’s runtime behavior is type unstable for these parameters, accepting datetime objects when units are set but requiring floats otherwise, making precise static typing difficult. Contributors agree that relaxing the type hints, potentially to
-
[TST]: Streamlining the
platform.machine() == 'x86_64'
check: This issue addresses inconsistencies in matplotlib's test suite results on x86_64 platforms, particularly when packaging for Gentoo, where image comparison tests fail due to subtle differences likely caused by specific CI setups rather than the platform itself. The proposer suggests streamlining the repeated platform checks by centralizing them into a single constant and allowing overrides via environment variables to better handle varying RMS thresholds during testing.- The discussion highlights that test failures are influenced by the version of the freetype library used, with a pinned version ensuring consistent results; the user confirms building a bundled freetype for testing. It is acknowledged that minor image differences arise from platform-specific factors like compiler flags, and while Fedora's approach was suggested, Gentoo requires a more flexible solution to accommodate diverse build configurations.
- 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.
- [Bug]: Misalignment of Labels and Incorrect Density Values in
ax.hist()
for Categorical Variables: This issue addresses a bug in theax.hist()
function of Matplotlib when used with categorical variables and thedensity=True
parameter, where the density values are incorrectly computed due to the internal conversion of categories to integers and the resulting bin widths not being equal to one. Additionally, the issue highlights a misalignment problem where the x-axis labels are not centered on the bars, compounded by a lack of clear documentation on how categories are mapped to integers, making it difficult to correctly position the labels. - [ENH]: Parse "\limits" in mathtext: This issue addresses a problem in the matplotlib mathtext module where the LaTeX command "\limits" is not recognized and causes a parsing error when rendering mathematical expressions, specifically integrals with limits displayed above and below the integral sign. The user expects the "\limits" command to properly format the integral with its limits positioned accordingly, but instead encounters a ValueError indicating an unknown symbol, highlighting the need for enhanced parsing support for "\limits" in mathtext.
- [ENH]: Fix precision displayed by LogFormatter.format_data_short: This issue addresses the lack of precision adjustment in the display of mouse cursor values for logarithmic scale formatters within the toolbar, which currently only exists for linear scale formatters. The reporter suggests implementing a similar feature for log formatters to match the cursor pointing precision, enhancing the accuracy of displayed data values.
- [Bug]:
ax.transData
does not honor data limits: This issue reports a bug in Matplotlib where the transformationax.transData
does not respect the current data limits set byxlim
andylim
, causing it to use outdated data limits when transforming coordinates. The user highlights that although the documentation implies data limits update automatically with new data, in practice, manual calls to methods likeset_xlim
orset_ylim
are required to refresh these limits, leading to confusion and inconsistent behavior. Since there were fewer than 5 open issues, all of the open issues have been listed above.
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:
- Axes3D method improvements: The
Axes3D.set_aspect
method requires investigation to remove an unnecessarysuper()
call and to deprecate the irrelevantanchor
argument for 3D axes. Additionally, the default behavior of theadjustable
parameter when set to None needs proper documentation as it is currently undocumented. - issues/30364
- Type hint restrictions in annotations: The type hints for the
xy
andxycoords
parameters inAxes.annotate
are too restrictive, only allowing tuples of floats, which causes type checker errors when using valid datetime-like objects. Despite these errors, there are no runtime problems when annotating on datetime axes. - issues/30365
- Draggable legend and annotation bugs: In matplotlib version 3.10.3, draggable legends and annotations do not respect outlines during drag operations, causing the entire object to move regardless of click location. This bug is specific to the qtagg backend on Windows 11 and was not present in version 3.10.1.
- issues/30378
- Platform-specific test suite checks: The test suite contains repeated
platform.machine() == 'x86_64'
checks that need to be streamlined and centralized to better handle platform-specific image comparison tolerances. This is particularly important for Gentoo systems, where diverse compiler and flag configurations cause minor rendering differences leading to test failures. - issues/30380
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:
- Inset axes positioning and layering issues: There are problems with controlling the layering of lines drawn with
ConnectionPatch
on Matplotlib figures, as they always appear on top of inset and primary plot axes regardless of zorder settings, obscuring labels and ticks. Additionally, the inset_axes feature lacks separate x and y border padding options, which limits precise control over inset placement and can cause axis label overlap in corner positions. - [issues/30308, issues/30331]
- New plot type proposal: A request was made to add a new function
ax.violinboxplot()
to Matplotlib to simplify creating combined violin and box plots by automatically managing alignment and styling, aiming to improve usability with a streamlined one-line method. - [issues/30336]
- Python 3.14 compatibility bug: Running a simple Matplotlib Pyplot example on Python 3.14 triggers a
RecursionError
due to infinite recursion in thepath.py
deepcopy method, preventing the example from functioning correctly. - [issues/30370]
- Legend labeling for contour plots: Users want a straightforward and stable way to assign legend labels directly to contour plots similar to line plots, as current methods are unintuitive, deprecated, or require cumbersome workarounds that do not accurately represent contour lines in legends.
- [issues/30371]
- Mouse event handling bug on macOS backend: Single-click mouse events fail to register on Matplotlib plots using the
macosx
backend when there are many subplots (around 225) each with at least one annotation, a problem not observed with other backends or fewer subplots. - [issues/30372]
- Segmentation fault with GeoAxes and cartopy: A segmentation fault occurs when creating GeoAxes with cartopy's NorthPolarStereo projection and calling
set_extent()
orplt.show()
, which was resolved by updating Matplotlib, shapely, and cartopy to their latest versions. - [issues/30379]
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: 2
Key Open Pull Requests
1. Support standard tickdir control (in/out/inout) in axisartist.: This pull request enhances the axisartist module by adding support for standard tick direction controls ("in", "out", and "inout"), aligns tick behavior with rcParams to default ticks pointing outwards, reworks the tick direction mechanism, and deprecates unused attributes while preserving existing behaviors and suggesting potential future improvements for orthogonal tick drawing.
- URL: pull/30369
- Merged: No
- Associated Commits: 5a134
2. Fix display of figure window mouse coordinates using wx python backends.: This pull request fixes the issue where mouse coordinates were not visible in the figure window when using the wx Python backend by setting an initial size for the text control displaying the coordinates, thereby ensuring proper display without causing flickering.
- URL: pull/30377
- Merged: No
- Associated Commits: 39a5c
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. Register 'avif' format when available in Pillow: This pull request adds support for the 'avif' image format in Matplotlib by registering it with Pillow, thereby fixing the error encountered when saving figures as .avif files.
- URL: pull/30363
- Merged: 2025-07-30T20:41:27Z
2. Mnt/test qol improvements: This pull request introduces minor quality of life improvements to the test suite, including ignoring additional Meson files and implementing retries for flaky tests on continuous integration, as identified during debugging of previous test failures.
- URL: pull/30373
- Merged: 2025-07-30T20:32:20Z
3. Fix mlab fallback for 32-bit systems: This pull request fixes a swapped condition typo in the mlab fallback for 32-bit systems originally introduced in a previous change, and adds a targeted test for the csd
function to ensure correctness across platforms including 64-bit systems and WASM.
- URL: pull/30273
- Merged: 2025-07-31T22:34:35Z
- Associated Commits: a5c27
Other Closed Pull Requests
- Fixes for image deletion in failing tests: This pull request rewrites the shell script responsible for deleting source images to prevent overdeletion, ensuring that expected and actual PDF-converted-to-PNG files are preserved when PDF tests fail. This fix addresses the issue of mistakenly deleting important test artifacts during failure scenarios.
pull/30284
- Improvements to minor log tick display logic: The logic for displaying default minor log ticks is enhanced to keep the default minor ticks not only when there are two minor ticks but also when there is one major and one minor tick. This prevents an unnecessary switch to AutoLocator, improving tick display consistency.
pull/30348
- Enhancement of AnchoredOffsetbox padding options: The
AnchoredOffsetbox
is improved to allow theborderpad
parameter to accept a tuple for separate horizontal and vertical padding values. This provides finer control over anchored element positioning while maintaining backward compatibility.
pull/30359
- Documentation cross-referencing for related examples: User navigation is improved by cross-referencing the two-scales and secondary-axes examples in the documentation, making it easier to find related content such as the twin axes example when searching for secondary axes or vice versa. This enhances discoverability of related plotting techniques.
pull/30366
- Fixes for secondary axis tick handling and function signature preservation: This pull request fixes the issue where passing xticks or yticks to secondary_xaxis or secondary_yaxis constructors was ignored by properly setting ticks via a private flag. It also simplifies the
set_ticks
implementation by usingfunctools.wraps
to preserve function signatures.
pull/30367
- Refactoring get_grid_info to accept Bbox objects: The function
get_grid_info
is modified to accept a single Bbox object instead of multiple coordinate values, improving code clarity and consistency. This change follows previous updates that replaced coordinate quadruplets with Bbox objects.
pull/30368
- Improved layout for determinism test plots: The layout of determinism test plots is enhanced by organizing each optional section into subfigures and automatically resizing the figure based on the number of sections. This results in a more coherent and visually reasonable presentation compared to previous overlapping and inconsistent grid arrangements.
pull/30374
- Fixes to syntax highlighting in installation documentation: Syntax highlighting in the installation documentation is corrected by tagging almost all code blocks as shell instead of python, while marking the remaining python blocks as doctests with appropriate reStructuredText syntax. This improves readability and accuracy of the documentation.
pull/30375
- Simplification and improvement of simple_axis_pad demo: The setup of axes in the simple_axis_pad demo is shortened and simplified to follow the style of demo_axis_direction, improving code legibility and removing unnecessary special handling of underscores due to usetex enhancements. The example is refocused more clearly on demonstrating axis padding.
pull/30376
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 | 5 | 0 | 2 | 58 |
QuLogic | 29 | 7 | 2 | 14 |
nrnavaneet | 16 | 2 | 0 | 10 |
anntzer | 9 | 7 | 0 | 9 |
rcomer | 1 | 0 | 0 | 17 |
tacaswell | 7 | 2 | 0 | 9 |
story645 | 2 | 0 | 1 | 13 |
dstansby | 9 | 1 | 1 | 5 |
livlutz | 13 | 0 | 0 | 1 |
lukashergt | 6 | 1 | 1 | 5 |