X Tutup
Skip to content

Fixes : Add setter/getter methods for all keyword parameters to Figure.__init__ #24617#27257

Closed
Lambxx wants to merge 8 commits intomatplotlib:mainfrom
Lambxx:main
Closed

Fixes : Add setter/getter methods for all keyword parameters to Figure.__init__ #24617#27257
Lambxx wants to merge 8 commits intomatplotlib:mainfrom
Lambxx:main

Conversation

@Lambxx
Copy link
Copy Markdown

@Lambxx Lambxx commented Nov 2, 2023

PR summary

This fixes Add setter/getter methods for all keyword parameters to Figure.init #24617
#24617
. It adds getters and setters for :
SubplotBars
Figsize
Layout .
It cherry picks code from #21549
as well as adding missing get/set for figsize
-->

layout needs added
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join us on gitter for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide

We strive to be a welcoming and open project. Please follow our Code of Conduct.

@story645
Copy link
Copy Markdown
Member

story645 commented Nov 2, 2023

Thanks for taking this on! Since you're building on a previous committees work, can you please add them as a coauthor https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors

@Lambxx
Copy link
Copy Markdown
Author

Lambxx commented Nov 3, 2023

Thanks for taking this on! Since you're building on a previous committees work, can you please add them as a coauthor https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors

Thanks for letting me know, ill take a look and do that

Testing added
Co-Authored by : Co-authored-by: @stanleyjs
GetSubPlot bars author added :
Co-Authored by : Co-authored-by: @stanleyjs
@Lambxx
Copy link
Copy Markdown
Author

Lambxx commented Nov 3, 2023

Co author : @stanleyjs added to commits

Copy link
Copy Markdown
Member

@story645 story645 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think deleting everything in colorbar is what's causing many of the test failures.

@Lambxx
Copy link
Copy Markdown
Author

Lambxx commented Nov 3, 2023

Thanks for pointing that out ill look through and see if i can fix some of them

deleted cbar in error added back
@Lambxx
Copy link
Copy Markdown
Author

Lambxx commented Nov 6, 2023

Im looking through the errors and trying to fix, but bit confused about the meaning of this one, any pointers appreciated

Stub: in file lib/matplotlib/figure.pyi
MISSING
Runtime: in file lib/matplotlib/figure.py:2930
<function Figure.set_layout at 0x7f56cf17f9d0>

Updated with original test from
matplotlib#21549
written by @stanleyjs

Co-Authored-By: Jay Stanley <stanleyjs@users.noreply.github.com>
@story645
Copy link
Copy Markdown
Member

story645 commented Nov 7, 2023

Tests should be added to https://github.com/matplotlib/matplotlib/blob/main/lib/matplotlib/tests/test_figure.py and not put in a new file -> I think that's why coverage thinks nothing is tested. And that error is I think cause you need to add the new setter/getter methods to https://github.com/matplotlib/matplotlib/blob/main/lib/matplotlib/figure.pyi

see https://matplotlib.org/devdocs/devel/contribute.html#type-hints

@melissawm
Copy link
Copy Markdown
Member

We discussed issue #24617 in the weekly meeting yesterday, and the general opinion is that this issue needs refinement before it's actually actionable.

For this reason, I will close all related open issues for now. This does not mean you can't open another PR in the future or that your solution is necessarily innapropriate, but this will help us focus our efforts.

Thank you for your contribution and hope to see you around!

@melissawm melissawm closed this Mar 27, 2026
@github-project-automation github-project-automation bot moved this from Waiting for author to Done in First Time Contributors Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

[ENH]: Add setter/getter methods for all keyword parameters to Figure.__init__

3 participants

X Tutup