File:Simultaneous equations example 1.svg

Original file(SVG file, nominally 305 × 314 pixels, file size: 61 KB)

Captions

Captions

Add a one-line explanation of what this file represents

Summary edit

Description
English: An illustration of how the two example equations in the simultaneous equations entry intersect with each other. Created using python.
Date
Source Own work
Author Krishnavedala
Other versions w:File:Simultaneous_equations_example_1.png
SVG development
InfoField
 
The SVG code is valid.
 
This plot was created with Matplotlib.

Source Code edit

from matplotlib.pyplot import *
from numpy import *
from mpl_toolkits.axisartist import *

theta = linspace(-pi,pi,100)
x1, y1 = cos(theta), sin(theta)
x2, y2 = theta, -0.5*theta

def myAxes(this,xlim,ylim,zero=False):
	if zero:
		this.axis[:].set_visible(False)
		this.axis["x"] = ax.new_floating_axis(0,0)
		this.axis["x"].set_axisline_style("-|>")
		this.axis["y"] = ax.new_floating_axis(1,0)
		this.axis["y"].set_axisline_style("-|>")
		this.axis["y"].set_axis_direction("left")
	this.grid(True)
	this.minorticks_on()
	this.set_xlim(-xlim,xlim)
	this.set_ylim(-ylim,ylim)
	this.set_xticks([-1,-.5,.5,1])
	this.set_yticks([-1,-.5,0,.5,1])
	this.set_xticklabels([r"$-1$",r"$-\frac{1}{2}$",r"$\frac{1}{2}$",r"$1$"])
	this.set_yticklabels([r"$-1$",r"$-\frac{1}{2}$",r"$0$",r"$\frac{1}{2}$",r"$1$"])
	this.text(xlim,.1,"x")
	this.text(.1,ylim,"y")
	this.legend(frameon=False, handletextpad=0, \
		labelspacing=.05,bbox_to_anchor=(1.1,1.1))
	setp(this.get_legend().get_texts(),fontsize=12)

fig = figure(figsize=(4,4))
ax = Subplot(fig,"111",axisbg='none')
fig.add_subplot(ax)
ax.plot(x1,y1,'g',linewidth=2,label=r"$x^2+y^2=1$")
ax.plot(x2,y2,'r',linewidth=2,label=r"$2x+4y=0$")
pt1 = (-2.,1.) / sqrt(5.)
pt2 = -pt1
ax.plot([][0],pt2[0],[][1],pt2[1],'o')
ax.annotate(r"$\left(-\frac{2}{\sqrt{5}},\frac{1}{\sqrt{5}} \right)$", \
	xy=pt1, xytext=(-1.5,1),ha='left',arrowprops= \
	dict(arrowstyle="->"),fontsize='large')
ax.annotate(r"$\left(\frac{2}{\sqrt{5}},-\frac{1}{\sqrt{5}} \right)$", \
	xy=pt2, xytext=(1.5,-1),ha='right',arrowprops= \
	dict(arrowstyle="->"),fontsize='large')
myAxes(ax,1.5,1.5,zero=True)

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

Licensing edit

I, the copyright holder of this work, hereby publish it under the following licenses:
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.
GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
You may select the license of your choice.

File history

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

Date/TimeThumbnailDimensionsUserComment
current01:30, 10 June 2011Thumbnail for version as of 01:30, 10 June 2011305 × 314 (61 KB)Krishnavedala (talk | contribs){{Information |Description ={{en|1=An illustration of how the two example equations in the simultaneous equations entry intersect with each other. Created using python.

There are no pages that use this file.

File usage on other wikis

The following other wikis use this file: