-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
add documentation for quality in savefig #11529
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
Conversation
based on the discussion here #458 and also using some of the lines from https://matplotlib.org/api/backend_agg_api.html?highlight=print_jpeg#matplotlib.backends.backend_agg.FigureCanvasAgg.print_jpeg
add documentation for quality in savefig
Thanks @pharshalp ! It looks like you have some trailing whitespace
that needs to be addressed. |
lib/matplotlib/figure.py
Outdated
@@ -1812,6 +1812,13 @@ def savefig(self, fname, *, frameon=None, transparent=None, **kwargs): | |||
The resolution in dots per inch. If *None*, defaults to | |||
:rc:`savefig.dpi`. If 'figure', uses the figure's dpi value. | |||
|
|||
quality : [ *None* | 95 >= scalar >= 1 ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 <= scalar <= 95 seems to be the more natural way to do so?
I would also just leave the upper bound be 100 here and have the note about values above 95 below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @anntzer. Yep, 1 <= scalar <= 95 does feel more natural. Also changed the upper bound to 100.
Thanks @pharshalp and congratulations on your first Matplotlib contribution 🎉 I squash-merged this to remove the stray merge commit. It looks like you created a feature branch (good!) but then merged it into your forks master branch and opened this PR from your master branch. In general it is better to open the PR directly from your feature branch. |
@tacaswell Thanks! will keep that in mind for the future contributions. |
#458
(if accepted) My first contribution to Matplotlib!!!
based on the discussion here #458
and also using some of the lines from
https://matplotlib.org/api/backend_agg_api.html?highlight=print_jpeg#matplotlib.backends.backend_agg.FigureCanvasAgg.print_jpeg
PR Summary
PR Checklist
Has Pytest style unit testsNew features are documented, with examples if plot relatedAdded an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way