8000 Doc: Remove hard-documented rcParams defaults by timhoffm · Pull Request #15230 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Doc: Remove hard-documented rcParams defaults #15230

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions examples/images_contours_and_fields/interpolation_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
This example displays the difference between interpolation methods for
:meth:`~.axes.Axes.imshow`.

If *interpolation* is None, it defaults to the :rc:`image.interpolation`
(default: ``'nearest'``). If the interpolation is ``'none'``, then no
interpolation is performed for the Agg, ps and pdf backends. Other backends
will default to ``'antialiased'``.
If *interpolation* is None, it defaults to the :rc:`image.interpolation`.
If the interpolation is ``'none'``, then no interpolation is performed for the
Agg, ps and pdf backends. Other backends will default to ``'antialiased'``.

For the Agg, ps and pdf backends, ``interpolation = 'none'`` works well when a
big image is scaled down, while ``interpolation = 'nearest'`` works well when
Expand Down
2 changes: 1 addition & 1 deletion examples/text_labels_and_annotations/unicode_minus.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

By default, tick labels at negative values are rendered using a `Unicode
minus`__ (U+2212) rather than an ASCII hyphen (U+002D). This can be controlled
by setting :rc:`axes.unicode_minus` (which defaults to True).
by setting :rc:`axes.unicode_minus`.
Copy link
Member

Choose a reason for hiding this comment

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

We should re-write this sentence somewhat. With the default there, it seems like it's saying you should set it to the default. But the sentence is only trying to say set it to anything (manually.)


__ https://en.wikipedia.org/wiki/Plus_and_minus_signs#Character_codes

Expand Down
7 changes: 3 additions & 4 deletions examples/ticks_and_spines/tick_xlabel_top.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
Set default x-axis tick labels on the top
==========================================

We can use :rc:`xtick.labeltop` (default False) and :rc:`xtick.top`
(default False) and :rc:`xtick.labelbottom` (default True) and
:rc:`xtick.bottom` (default True) to control where on the axes ticks and
their labels appear.
We can use :rc:`xtick.labeltop` and :rc:`xtick.top` and :rc:`xtick.labelbottom`
and :rc:`xtick.bottom` to control where on the axes ticks and their labels
appear.

These properties can also be set in ``.matplotlib/matplotlibrc``.
"""
Expand Down
10 changes: 5 additions & 5 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -5469,11 +5469,11 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
that the data fit in the axes. In general, this will result in
non-square pixels.

If not given, use :rc:`image.aspect` (default: 'equal').
If not given, use :rc:`image.aspect`.

interpolation : str, optional
The interpolation method used. If *None*
:rc:`image.interpolation` is used, which defaults to 'nearest'.
The interpolation method used. If *None*, :rc:`image.interpolation`
is used.

Supported values are 'none', 'antialiased', 'nearest', 'bilinear',
'bicubic', 'spline16', 'spline36', 'hanning', 'hamming', 'hermite',
Expand Down Expand Up @@ -5782,7 +5782,7 @@ def pcolor(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
*edgecolors*\ ="none" is used. This eliminates artificial lines
at patch boundaries, and works regardless of the value of alpha.
If *edgecolors* is not "none", then the default *antialiaseds*
is taken from :rc:`patch.antialiased`, which defaults to True.
is taken from :rc:`patch.antialiased`.
Stroking the edges may be preferred if *alpha* is 1, but will
cause artifacts otherwise.

Expand Down Expand Up @@ -7650,7 +7650,7 @@ def spy(self, Z, precision=0, marker=None, markersize=None,
- 'auto': The axes is kept fixed and the aspect is adjusted so
that the data fit in the axes. In general, this will result in
non-square pixels.
- *None*: Use :rc:`image.aspect` (default: 'equal').
- *None*: Use :rc:`image.aspect`.

Default: 'equal'

Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/contour.py
Original file line number Diff line number Diff line change
Expand Up @@ -1626,7 +1626,7 @@ def _initialize_x_y(self, z):
nearest those points are always masked out, other triangular
corners comprising three unmasked points are contoured as usual.

Defaults to :rc:`contour.corner_mask`, which defaults to ``True``.
Defaults to :rc:`contour.corner_mask`.

colors : color string or sequence of colors, optional
The colors of the levels, i.e. the lines for `.contour` and the
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -2100,7 +2100,7 @@ def savefig(self, fname, *, transparent=None, **kwargs):
quality : [ *None* | 1 <= scalar <= 100 ]
The image quality, on a scale from 1 (worst) to 95 (best).
Applicable only if *format* is jpg or jpeg, ignored otherwise.
If *None*, defaults to :rc:`savefig.jpeg_quality` (95 by default).
If *None*, defaults to :rc:`savefig.jpeg_quality`.
Values above 95 should be avoided; 100 completely disables the
JPEG quantization stage.

Expand Down
0