File:Interpolation-nearest.svg
出自Wikimedia Commons
跳至導覽
跳至搜尋
此 SVG 檔案的 PNG 預覽的大小:450 × 450 像素。 其他解析度:240 × 240 像素 | 480 × 480 像素 | 768 × 768 像素 | 1,024 × 1,024 像素 | 2,048 × 2,048 像素。
原始檔案 (SVG 檔案,表面大小:450 × 450 像素,檔案大小:25 KB)
檔案資訊
結構化資料
說明
摘要
[編輯]描述Interpolation-nearest.svg |
English: Illustration of en:Nearest neighbor interpolation on a random dataset.
Compare with other interpolation methods that share the same dataset: File:Interpolation-bilinear.svg File:Interpolation-bicubic.svg File:Interpolation-hermite.svg |
日期 | |
來源 | 自己的作品 |
作者 | Zykure |
SVG開發 InfoField | 本vector image使用Matplotlib創作。 |
原始碼 InfoField | Python code#!/usr/bin/env python
# -*- encoding: utf-8 -*-
import sys
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import rcParams
rcParams['font.size'] = 18
# Available interpolation methods:
# 'none', 'nearest', 'bilinear', 'bicubic', 'spline16',
# 'spline36', 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric',
# 'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc', 'lanczos'
METHODS = [ 'nearest', 'bilinear', 'bicubic', 'hermite' ]
FORMATS = [ 'png', 'pdf', 'svg' ]
COLORS = 'viridis'
N = 5
np.random.seed(1)
grid = np.arange(0, N, 1)
data = np.round(np.random.rand(N, N), 1)
mesh = np.meshgrid(grid, grid)
for interp in METHODS:
fig = plt.figure(figsize=(5,5))
ax = fig.add_axes([0.125, 0.175, 0.75, 0.75])
plt.imshow(data, interpolation=interp, cmap=COLORS, vmin=0, vmax=1)
plt.plot(mesh[0], mesh[1], marker='.', ms=8, color='k', lw=0)
plt.title(interp, weight='bold')
plt.xlim(grid.min()-0.5, grid.max()+0.5)
plt.ylim(grid.min()-0.5, grid.max()+0.5)
plt.xticks(grid)
plt.yticks(grid)
cax = fig.add_axes([0.125, 0.075, 0.75, 0.03])
cb = plt.colorbar(cax=cax, orientation='horizontal',
ticks=np.linspace(0, 1, 6))
cb.solids.set_edgecolor('face')
for ext in FORMATS:
plt.savefig("{}_{}.{}".format(sys.argv[0], interp, ext))
|
授權條款
[編輯]我,本作品的著作權持有者,決定用以下授權條款發佈本作品:
此檔案採用創用CC 姓名標示-相同方式分享 4.0 國際授權條款。
- 您可以自由:
- 分享 – 複製、發佈和傳播本作品
- 重新修改 – 創作演繹作品
- 惟需遵照下列條件:
- 姓名標示 – 您必須指名出正確的製作者,和提供授權條款的連結,以及表示是否有對內容上做出變更。您可以用任何合理的方式來行動,但不得以任何方式表明授權條款是對您許可或是由您所使用。
- 相同方式分享 – 如果您利用本素材進行再混合、轉換或創作,您必須基於如同原先的相同或兼容的條款,來分布您的貢獻成品。
檔案歷史
點選日期/時間以檢視該時間的檔案版本。
日期/時間 | 縮圖 | 尺寸 | 使用者 | 備註 | |
---|---|---|---|---|---|
目前 | 2018年3月31日 (六) 23:56 | 450 × 450(25 KB) | Nicoguaro(留言 | 貢獻) | Change colormap to viridis | |
2016年9月1日 (四) 08:15 | 450 × 450(89 KB) | Zykure(留言 | 貢獻) | User created page with UploadWizard |
無法覆蓋此檔案。
檔案用途
下列頁面有用到此檔案:
全域檔案使用狀況
以下其他 wiki 使用了這個檔案:
- ar.wikipedia.org 的使用狀況
- ca.wikipedia.org 的使用狀況
- en.wikipedia.org 的使用狀況
- es.wikipedia.org 的使用狀況
- fa.wikipedia.org 的使用狀況
- fr.wikibooks.org 的使用狀況
- pl.wikipedia.org 的使用狀況
- www.wikidata.org 的使用狀況
- zh.wikipedia.org 的使用狀況
詮釋資料
此檔案中包含其他資訊,這些資訊可能是由數位相機或掃描器在建立或數位化過程中所新增的。若檔案自原始狀態已被修改,一些詳細資料可能無法完整反映出已修改的檔案。
寬度 | 360pt |
---|---|
高度 | 360pt |