File:RationalDegree3.svg

From Department of Mathematics at UTSA
Jump to navigation Jump to search

Original file(SVG file, nominally 398 × 398 pixels, file size: 29 KB)

This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

Summary

Description
English: Rational function of degree 2 defined by .
Date
Source Own work
Author Krishnavedala
Other versions File:RationalDegree3byXedi.gif
SVG development
InfoField
 
The SVG code is valid.
 
This plot was created with Matplotlib.
Source code
InfoField

Python code

from numpy import *
from matplotlib.pyplot import *
from mpl_toolkits.axes_grid.axislines import SubplotZero

xlim,ylim = 10,10
x1 = linspace(-xlim,-sqrt(5.))
x2 = linspace(-sqrt(4.99),sqrt(4.99))
x3 = linspace(sqrt(5.01),xlim)
y = lambda x: .5*(x**3 - 2.*x) / (x**2 - 5.)

fig = figure(figsize=(5,5))
ax = SubplotZero(fig,111)
fig.add_subplot(ax)

for direction in ["xzero","yzero"]:
        ax.axis[direction].set_visible(True)
        ax.axis[direction].set_axisline_style("->")
for direction in ["top","bottom","left","right"]:
        ax.axis[direction].set_visible(False)
ax.axis["yzero"].set_axis_direction("left")
ax.grid(False)
ax.minorticks_on()

ax.plot(x1,y(x1),'b')
ax.plot(x2,y(x2),'b')
ax.plot(x3,y(x3),'b')
ax.arrow(-10,-5,20,10,color='k',lw=.5,ls='dashed')
ax.arrow(-sqrt(5.),-ylim,0.,2.*ylim+1,color='k',lw=.5,ls='dashed')
ax.arrow(sqrt(5.),-ylim,0.,2.*ylim+1,color='k',lw=.5,ls='dashed')
ax.set_ylim(-ylim,ylim)

fig.savefig("RationalDegree3.svg",bbox_inches="tight",pad_inches=.15)

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.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

6 September 2011

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current12:21, 6 September 2011Thumbnail for version as of 12:21, 6 September 2011398 × 398 (29 KB)Krishnavedala{{Information |Description ={{en|1=Rational function of degree 2 defined by <math>y = \frac{x^3-2x}{2\left(x^2-5\right)}</math>. Created in python.}} |Source ={{own}} |Author =[[User:Krishnavedala|Kr