|
1 | | -''' |
| 1 | +""" |
2 | 2 | ================================= |
3 | 3 | Interpolations for imshow/matshow |
4 | 4 | ================================= |
5 | 5 |
|
6 | | -''' |
| 6 | +This example displays the difference between interpolation methods for imshow |
| 7 | +and matshow. |
7 | 8 |
|
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. |
10 | 16 |
|
11 | | -# from the docs: |
| 17 | +""" |
12 | 18 |
|
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 |
19 | 21 |
|
20 | 22 | methods = [None, 'none', 'nearest', 'bilinear', 'bicubic', 'spline16', |
21 | 23 | 'spline36', 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric', |
|
0 commit comments