Weekly GitHub Report for Matplotlib: March 03, 2025 - March 10, 2025
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.
-
[ENH]: directional antialiasing filter: This issue discusses the need for a directional antialiasing filter in the
imshow()
function of a GitHub project, specifically for cases where data is highly sampled in one direction but not in the other, which can lead to visual artifacts at the boundaries between data and NaN values. The current interpolation settings do not adequately address these artifacts, and the proposed solution is to implement a separable antialiasing filter that can be applied in a specific direction, ideally in the RGBA space.- The comments discuss the niche nature of the request, questioning its precedence in other libraries, and suggest that high-resolution saving might mitigate the issue. There is a debate on whether the current antialiasing filter is sufficient, with some suggesting user control over the filter's color. The discussion also touches on the possibility of allowing directionality as a parameter and the challenges of implementing such a feature, with some support for exploring a solution if it is feasible.
- Number of comments this week: 15
-
Option to add FancyBboxPatch around quiverkey(): This issue addresses a bug in Matplotlib 3.10 where the
bbox
parameter, intended for the label of thequiverkey
, is incorrectly passed to the underlyingPolyCollection
object, causing anAttributeError
. The user suggests an alternative approach usingaxes.text
with abbox
to avoid the issue, and there is a discussion about the desired behavior of having a box around both the arrow and text, similar to a legend.- The comments discuss the lack of
bbox
support inquiverkey
and suggest usingText
to create a box around the label. There is a consensus that a box around both the arrow and text would be ideal, similar to a legend, and a workaround is provided to manually add a box around the text. The user confirms they manually added the box usingaxes.text
. - Number of comments this week: 7
- The comments discuss the lack of
-
[Bug]: Unexpected output when using
fill
with a polar projection plot: This issue describes a bug encountered when using thefill
function to create a cone shape on a polar projection plot in Matplotlib, where the cone does not render correctly if the radial limits of the polygon are smaller than the plot's radial limits. The user is seeking a way to freely choose the radial limits (rlim
) without affecting the rendering of the cone, as attempts to usefill_between
also result in the same problem.- The comments discuss a workaround using
np.clip
to adjust the radial data, but this solution is not ideal as it fails when the radial limits are rescaled. The discussion highlights the complexity of implementing a fix due to the nature of clipping and rendering lines in polar plots, leading to a consensus that a straightforward solution may not be feasible. - Number of comments this week: 3
- The comments discuss a workaround using
-
[Doc]: Stable version of documentation has unstable banner: This issue highlights a problem with the Matplotlib documentation where the stable version of the documentation incorrectly displays a red banner indicating it is an unstable development version. The user suggests that the "unstable" banner should not appear on the stable documentation pages to avoid confusion.
- The comments discuss potential causes, such as caching issues, and provide details about the version and URL involved. Another user confirms experiencing the same issue, indicating it might be a widespread problem.
- Number of comments this week: 3
-
[Bug]: Matplotlib selects TkAgg backend on LXC containers: This issue reports a bug encountered when updating Matplotlib from version 3.8.3 to 3.10.0, where the TkAgg backend is selected in LXC containers, causing an ImportError due to the 'tk' interactive framework not being available in a headless environment. The problem did not occur with the previous version of Matplotlib, suggesting a regression in the new version when running tests in a containerized environment.
- The first comment suggests that the test is explicitly setting the TkAgg backend without a graphical session, recommending either not forcing a GUI backend or providing a graphical environment. The second comment refutes this by stating that no explicit setting of TkAgg was found in the code, indicating a possible regression in the new Matplotlib version since the same setup worked with version 3.8.3.
- 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.
- [Doc]: Release docs include Next what's new pages: This issue pertains to the inclusion of a "Next what's new" page in the release documentation of a project, which ideally should not be present in the documentation for official releases. The problem highlights a need for improvement in the documentation process to ensure that only relevant and finalized content is included in release versions.
- [ENH]: out-of-tree Pyodide builds in CI for Matplotlib: This issue is about implementing out-of-tree Pyodide builds for Matplotlib using the Emscripten toolchain to create wasm32 wheels, which aims to enhance the interoperability of the Scientific Python ecosystem with Pyodide and facilitate interactive documentation in JupyterLite notebooks. The proposed solution involves setting up a CI pipeline on GitHub Actions to build and test the development version of Matplotlib against a Pyodide wasm32 runtime, addressing any test failures due to current Pyodide limitations.
- [Bug]: constrained layout clips y-label above y-axis: This issue describes a bug in the Matplotlib library where the y-label is clipped when placed above the y-axis using constrained layout, although it displays correctly with tight layout or when positioned on the left side. The problem persists across different plot configurations, including single and multiple plots, and the user has attempted various solutions such as adjusting vertical alignments and following layout guides without success, suggesting a potential bug in the constrained layout functionality.
- [Bug]: Matplotlib date2num timezone removal issue: This issue pertains to a bug in the Matplotlib library's
date2num
function, where a problem arises when handling lists containing both timezone-aware datetime objects and plain date objects. The function only checks the timezone information of the first element in the list, leading to an error when subsequent elements are plain dates, as they lack theastimezone
method required for conversion. - [Bug]: Exported PDF figures cannot be modified by Adobe Illustrator correctly.: This issue describes a bug where figures generated using the
imshow
function in Matplotlib and saved as PDF files are not displayed correctly when opened in Adobe Illustrator, with colors being incorrectly assigned. The problem persists despite using the specified code and environment, and it affects the visual integrity of the exported figures, making them unsuitable for further editing in Adobe Illustrator.
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: 8
Summarized Issues:
- Enhancements in Matplotlib: The request to enhance
rcParams
in Matplotlib aims to add control over the defaultzorder
for plot elements like grids and lines. This enhancement would allow users to customize the layering of plot elements, improving the flexibility and aesthetics of plots.
- Bugs in Matplotlib Rendering: Several issues highlight bugs in Matplotlib's rendering, such as the linewidths parameter in scatter plots scaling unexpectedly and incorrect rendering of cone shapes in polar plots. These bugs affect the visual output of plots, requiring workarounds or fixes to ensure accurate representation.
- Quiverkey and Linestyle Bugs: Bugs in Matplotlib 3.10 include an
AttributeError
with thequiverkey
'sbbox
parameter and aValueError
with tuple-type linestyles in histograms. These issues disrupt functionality and require code adjustments to maintain compatibility with previous versions.
- Antialiasing in Imshow: The need for a directional antialiasing filter in the
imshow()
function is discussed to address artifacts in highly sampled data. A separable filter could enhance visual quality by applying antialiasing only where necessary, improving the clarity of plots with NaN values.
- Documentation and Backend Issues: The Matplotlib documentation incorrectly displays a red banner for stable versions, and updating to version 3.10.0 causes an ImportError with the TkAgg backend in LXC containers. These issues affect user experience and compatibility in specific environments.
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: 4
Summarized Issues:
- Performance Degradation in
pint_pandas
: A significant performance issue arises when plotting data using thepint_pandas
library with units in apandas
DataFrame, resulting in a 60 times slower performance. This is due to the conversion ofSeries
objects into arrays ofQuantity
objects rather than arrays of plain numbers with units, suggesting a need for modifications in thepint_pandas
library or its converters.
- Seaborn
sns.heatmap
Annotation Bug: Thesns.heatmap
function from the Seaborn library, when used with theannot=True
parameter, only annotates the first row of a heatmap instead of all cells. This unexpected behavior suggests that the issue should be reported to Seaborn as it is not related to Matplotlib.
- Jupyter Plot Rendering Issue with
fivecentplots
: A bug is present where a simple plot chart with multiple Y values is not rendered correctly in Jupyter due to the use of an outdated "legendHandles" attribute. This attribute has been deprecated and renamed to "legend_handles" in Matplotlib 3.9, necessitating a fix in the fivecentplots library.
- Reversing 'Jet' Colormap Transformation: A user seeks guidance on reversing the 'jet' colormap transformation applied to a JPG image, where pixel values have been altered from their original range of 0 to 90. The inquiry involves understanding the mathematical transformation of 'jet' to restore the image to its original values, considering normalization and potential autoscaling in the colormap application.
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: 6
Key Open Pull Requests
1. merge up v3.10.1: This pull request involves merging updates and backports for version 3.10.1 of the Matplotlib project, including various documentation improvements, bug fixes such as correcting the title position for polar plots and handling of the pyplot.matshow
figure, as well as adjustments to dependencies and test cases, all aimed at enhancing the functionality and reliability of the software.
- URL: pull/29700
- Merged: No
- Associated Commits: 436c9, 63d01, b07ea, 5c590, ee06c, 35f47, 90ca9, 0545b, c6afd, 25813, dd1e1, f9e3c, 0db1c, 87216, 19e4d, 05ebb, 2bfd3, 1a8e6, 61310, 5357f, e5b36, a6398, 4d4c6, 80309, 873b2, 9c101, fe4fb, c7237, 2dc6f, d9b17, fe02b, 7bde6, b365e, fb59f, 9b990, c8d6b, 59265, bed82, 8d6ec, ff2d3, 9b12c, 572d5, 42901, 4f89d, e6bc4, 9be4e, ca8f0, a6dc6, 874af, 5d2d6, 7d7fe, e6a9e, de3cb, c0a92, ec3c2, 8f942, 30dc9, 90ae7, 11df0, 06c73, 73f0b, a645e, df5c4, 22cd6, dc002, bfd73, ab1e0, 3024b, edf80, b1777, a04d1, f83e8, 75b7b, 74830, c56f4, ca6b6, c4011, e715e, 1401d, 97aa6, 35eb7, 5affd, c27dd, da342, b9978, 43175, fa0c3, 9f74b, f82e4, d4238, 94692, c3dc3, 18354, 84598, 40012, 73a28, af136, b9e62, f4763, 1d915, 4b399, 41a7e, 4f3d4, d3cf5, 9fe0d, d23b1, 52678, 2495b, 33361, 6fc81, 14d07, d94f8
2. Improve tick subsampling in LogLocator.: This pull request aims to enhance the tick subsampling logic in the LogLocator of the Matplotlib library by ensuring that the maximum number of ticks are displayed without exceeding the specified number, spacing them optimally across the log scale, and revising tests to accommodate these changes, while also addressing compatibility with the classic mode by removing outdated checks.
- URL: pull/29698
- Merged: No
- Associated Commits: 667ab
3. FIX: Warn when trying to set_facecolor on a array-mapped Collection: This pull request addresses the issue of setting a facecolor on an array-mapped Collection in Matplotlib by implementing a warning to inform users that the explicit facecolor will be ignored due to colormapping precedence, thereby preventing this behavior from occurring silently, and it aims to close issue #27555.
- URL: pull/29715
- Merged: No
- Associated Commits: 4ff34
Other Open Pull Requests
- Enhancements to Matplotlib Functions: The pull requests focus on improving the functionality of Matplotlib's plotting functions. One enhancement introduces an
align
parameter to thebroken_barh()
function, allowing bars to be centered on labels. Another addresses the handling of singleton sequence-type styles in thehist
function, ensuring proper color and linestyle settings.
- Version Update for Matplotlib: This pull request updates the version switcher to version 3.10.1 in the Matplotlib project. The update aims to keep the version switcher current and potentially resolves issue #29712.
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: 7
Key Closed Pull Requests
1. Doc update wenbiming: This pull request involves a series of documentation updates and code refactoring efforts aimed at improving the clarity and organization of the project report, addressing specific issues, implementing a potential solution, and adding test code for bug fixes, although it was ultimately not merged into the main branch.
- URL: pull/29714
- Merged: No
- Associated Commits: 4a425, 29519, 91a38, 39e2a, ad119, 8a7c7, 49b7d, 68d1d, 0fdeb, 108bb, 9e6bb, 73488, 83395, ced43, 2fea4, 15153, 2569f, d8c78, f7130, d8358, 38f31, 4db85, 4cd80, a38ea, 8f531, 5cd22
2. MNT: Reduce the use of get_xticklabels() in examples: This pull request focuses on reducing the use of get_xticklabels()
in examples by replacing it with tick_params()
, which offers a more consistent axis-wide setting for tick modifications, and is part of the effort towards issue #29594, requiring the new text rotation mode "xtick" and targeting version 3.11 of the project.
- URL: pull/29602
- Merged: 2025-03-08T20:06:03Z
3. [Doc] Added images of hatches to hatch API page: This pull request updates the hatch API documentation in the Matplotlib project by adding images of hatches, cleaning up previous changes, and introducing a new mpl_type
for hatches that links to the API page, thereby addressing and closing issue #27196.
- URL: pull/29644
- Merged: 2025-03-04T11:58:37Z
- Associated Commits: 8aa8c
Other Closed Pull Requests
- Deprecation and Removal of
plot_date
Function: This topic covers the removal of theplot_date
function from the Matplotlib library, which was deprecated in version 3.9. The pull request ensures that the new and changed code is properly tested and documented according to the project's guidelines.
- Improvement of Developer Installation Documentation: This topic involves restructuring the developer installation documentation for the Matplotlib project to enhance clarity and accessibility. The changes include organizing instructions into tabs for different operating systems and creating subheadings to highlight the equivalence of local and GitHub installation options.
- Correction of Version Numbers in Deprecation Warnings: This topic addresses the correction of version numbers in deprecation warnings for plotting methods in the Matplotlib library. The pull requests ensure that the warnings accurately reflect the changes introduced in version 3.10 and include backporting these changes to the v3.10.x branch.
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 | 54 | 6 | 4 | 44 |
anntzer | 4 | 1 | 2 | 23 |
jklymak | 2 | 0 | 0 | 24 |
rcomer | 10 | 3 | 0 | 12 |
QuLogic | 12 | 1 | 0 | 9 |
tacaswell | 8 | 1 | 0 | 11 |
story645 | 7 | 2 | 1 | 10 |
star1327p | 18 | 0 | 0 | 0 |
No author found | 16 | 0 | 0 | 0 |
ksunden | 10 | 1 | 0 | 1 |