Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 303 allow kwargs for savefig #304

Conversation

josp70
Copy link

@josp70 josp70 commented Mar 10, 2024

This changes add a new argument to method plot in BinningTable and derived classes in order to fix the issue related to labels cut off when saving chart to files.

@@ -608,7 +608,7 @@ def build(self, show_digits=2, add_totals=True):
return df

def plot(self, metric="woe", add_special=True, add_missing=True,
style="bin", show_bin_labels=False, savefig=None, figsize=None):
style="bin", show_bin_labels=False, savefig=None, figsize=None, save_kwargs={}):

Choose a reason for hiding this comment

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

A function definition with a mutable type {} is bad practice. Please change to save_kwargs=None and amend the code appropriately.

Choose a reason for hiding this comment

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

Same comment for the definitions below. Thanks!

…th a mutable type {} is a bad practice. Changing to save_kwargs=None
Copy link
Owner

@guillermo-navas-palencia guillermo-navas-palencia left a comment

Choose a reason for hiding this comment

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

It looks very good. Thanks! I just noticed that save_kwargs is not part of the docstring.

@guillermo-navas-palencia guillermo-navas-palencia merged commit 8de83e4 into guillermo-navas-palencia:develop Mar 25, 2024
2 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants