File:Comparaison interpolation scipy interpolate polynomes.svg

Uploaded by Cdang
Upload date 2019-05-01T09:05:38Z
MIME type image/svg+xml
Dimensions 1800 × 1080 px
File size 38.4 KB

Summary

Description
Français : Comparaisons de différentes interpolations polynomiales par partie proposées par Python Numpy.
English: Comparison beteween various picewise polynomial interpolations proposed by Python Numpy.
Date
Source Own work
Author Cdang
SVG development
InfoField
 The source code of this SVG is invalid due to an error.
 This W3C-invalid plot was created with Matplotlib by cdang.

Source code

import numpy as np
from scipy import interpolate
import matplotlib.pyplot as plt

xp = np.linspace(0, 2*np.pi, 5)
yp = np.sin(xp)

finterpa = interpolate.CubicSpline(xp, yp)

xa = np.linspace(-0.5*np.pi, 2.5*np.pi, 29)
ya = finterpa(xa)

xb = np.linspace(-0.5*np.pi, 2.5*np.pi, 25)
yb = finterpb(xb)

xf = np.linspace(-0.5*np.pi, 2.5*np.pi, 25)
yf = finterpf.__call__(xf)

xg = np.linspace(-0.9*np.pi, 2.9*np.pi, 49)
yg = finterpg.__call__(xg)

fig = plt.figure(figsize=[20, 12])

plt.plot(xa, ya, label="CubicSpline")
plt.plot(xb, yb, label="interp1d quadratic")
plt.plot(xf, yf, label="PchipInterpolator")
plt.plot(xg, yg, label="Akima1DInterpolator")
plt.legend()

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

Captions

Comparison beteween various picewise polynomial interpolations.

Items portrayed in this file

depicts

30 April 2019

image/svg+xml

1f9dce9475e213de1df8e425da4af7861138ea80

39,326 byte

1,080 pixel

1,800 pixel