Skip to content

Commit 3aad976

Browse files
committed
DOC added more information on interpolation methods
1 parent 9692c31 commit 3aad976

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

examples/images_contours_and_fields/interpolation_methods.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
1-
'''
1+
"""
22
=================================
33
Interpolations for imshow/matshow
44
=================================
55
6-
'''
6+
This example displays the difference between interpolation methods for imshow
7+
and matshow.
78
8-
import matplotlib.pyplot as plt
9-
import numpy as np
9+
If `intperpolation` is None, it defaults to the rc image.interpolation
10+
parameter. If the interpolation is `none`, then no interpolation is performed
11+
for the Agg, ps and pdf backends. Other backends will defult to 'nearest'.
12+
13+
For the Agg, ps and pdf backends, interpolation = 'none' works well when a big
14+
image is scaled down, while interpolation = 'nearest' works well when a small
15+
image is blown up.
1016
11-
# from the docs:
17+
"""
1218

13-
# If interpolation is None, default to rc image.interpolation. See also
14-
# the filternorm and filterrad parameters. If interpolation is 'none', then
15-
# no interpolation is performed on the Agg, ps and pdf backends. Other
16-
# backends will fall back to 'nearest'.
17-
#
18-
# http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.imshow
19+
import matplotlib.pyplot as plt
20+
import numpy as np
1921

2022
methods = [None, 'none', 'nearest', 'bilinear', 'bicubic', 'spline16',
2123
'spline36', 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric',

lib/matplotlib/text.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ def __init__(self,
198198
rotation_mode=None,
199199
usetex=None, # defaults to rcParams['text.usetex']
200200
wrap=False,
201+
position=None,
201202
**kwargs
202203
):
203204
"""

0 commit comments

Comments
 (0)