File:RationalDegree3.svg

Uploaded by Krishnavedala
Upload date 2011-09-06T18:21:12Z
MIME type image/svg+xml
Dimensions 398 × 398 px
File size 28.8 KB

Summary

Description
English: Rational function of degree 2 defined by y=x3−2x2(x2−5).
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

29,450 byte

image/svg+xml

728d0e308e91acc693ff19b5cd2907272509bb27