File:Brent method example SVG.svg

Summary

Description
English: SVG version of Brent method example for y=(x+3)(x-1)^2. Plotted by Python Matplotlib.
Date
Source Own work
Author IkamusumeFan
Other versions Related work: See right.
A mulch simplified drawing and released to public domain. Brent method example.svg
SVG development
InfoField
Source code
InfoField

Python code

# Author: Ika, 2013-08-10

import numpy as np
import matplotlib.pyplot as plt
import scipy.special as sp
import random

plt.figure()
plt.axes([0.17,0.13,0.79,0.8])
plt.hold(True)

Q = []

# Draw the function curve.
X = np.arange(-4.5, 2.1, 0.001)
Y = (X+3)*(X-1)*(X-1)
a = plt.plot(X, Y, '-', color='blue', lw=3)
Q.append(a)

plt.xlim(-5,3)
plt.ylim(-32,10)
# Set up the spines
ax = plt.gca()
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))
# Set label
ax.text(-3.5,-20,r'$y=(x+3)(x-1)^2$',fontsize=24)

plt.savefig("Brent_method_example_SVG.svg")

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 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.
Category:CC-BY-SA-3.0#Brent%20method%20example%20SVG.svg
Category:Self-published work Category:Polynomial functions
Category:CC-BY-SA-3.0 Category:Polynomial functions Category:Self-published work Category:Valid SVG created with Matplotlib code