File:X sin 1 over x.svg

Summary

Description
English: Plot of the function and detail around the origin.
Français : Graphe de la fonction et détail autour de l'origine.
Date
Source Own work
Author Gapato
SVG development
InfoField
Source code
InfoField

(numpy/scipy/matplotlib) Python code

import matplotlib.pyplot as plt
import numpy as np

def f(x):
 return x*np.sin(1/x)

x = np.linspace(-3,3,10000)
xx = np.linspace(-.2,.2,10000)

plt.subplot(211)
plt.axhline(0, color='grey', lw=0.5)
plt.axvline(0, color='grey', lw=0.5)
plt.plot(x, f(x))

plt.subplot(212)
plt.axhline(0, color='grey', lw=0.5)
plt.axvline(0, color='grey', lw=0.5)
plt.plot(xx, f(xx))
plt.xlim(-0.2,0.2)

plt.suptitle(r'$x \mapsto x \sin(\frac{1}{x})$')

plt.show()

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Category:CC-Zero#X%20sin%201%20over%20x.svgCategory:Self-published work
Category:Sine function Category:Plots involving frequency or wavelength Category:Frequency modulation
Category:CC-Zero Category:Frequency modulation Category:Plots involving frequency or wavelength Category:Self-published work Category:Sine function Category:Valid SVG created with Matplotlib code