File:Limit Infinity SVG.svg
Summary
| Description |
English: SVG version to illustrate the limit of function at infinity point. Python source code available. |
| Date | |
| Source | Own work |
| Author | IkamusumeFan |
| SVG development | |
| Source code | Python codeimport matplotlib.pyplot as plt
import numpy as np
# Create a figure of size 8x8 points, 80 dots per inch
plt.figure(figsize=(8,8), dpi=80)
# Draw the limit lines
x = np.linspace(0.001,50.0,1024, endpoint=True)
y = 4.1+0*x
plt.plot(x,y,color="grey", linewidth=1.0, linestyle="--")
y = 3.9+0*x
plt.plot(x,y,color="grey", linewidth=1.0, linestyle="--")
y = 4.0+0*x
plt.plot(x,y,color="grey", linewidth=1.0, linestyle="--")
# Create a plot of the cubic function y = -3*sin(x)/x + 4
x = np.linspace(0.001, 50.0, 1024, endpoint=True)
y = -3*np.sin(x)/x + 4
plt.plot(x,y,color="blue", linewidth=3.0, linestyle="-")
# Set labels
plt.xlim(0.0,50.0)
plt.ylim(0.0,6.0)
# Move the spines
ax = plt.gca()
ax.axhspan(3.9, 4.1, facecolor="yellow", alpha=0.5, linewidth=0)
ax.text(2, 5.0, r'$f(x)=\frac{-3\,\sin(x)}{x}+4$', fontsize=24)
ax.text(45, 0.2, r'$x$', fontsize=24)
ax.text(45, 3.6, r'$2\varepsilon$', fontsize=24)
# Set up the spines
ax.spines['right'].set_color('none')
ax.spines['top'].set_color('none')
ax.xaxis.set_ticks_position('bottom')
ax.spines['bottom'].set_position(('data',0))
ax.yaxis.set_ticks_position('left')
ax.spines['left'].set_position(('data',0))
# Save the figure to the output SVG file
plt.savefig("Limit_Infinity_SVG.svg", bbox_inches="tight")
plt.show()
|
Licensing
I, the copyright holder of this work, hereby publish it under the following license:
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported 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.