a = int(raw_input("Enter the first number : "))
b = int(raw_input("Enter the second number : "))
if a > b:
print a, " IS THE BIGGEST NUMBER"
else:
print b, " IS THE BIGGEST NUMBER"
%matplotlib inline
import pylab
import matplotlib.pyplot as plt
x1 = int(raw_input("Enter start point coordinate : "))
y1 = int(raw_input())
x2 = int(raw_input("Enter end point coordinate : "))
y2 = int(raw_input())
pylab.plot([x1,y1],[x2,y2])
%matplotlib inline
import pylab
import matplotlib.pyplot as plt
#Tkinter package is used for graphics
from matplotlib.patches import Rectangle
from matplotlib.collections import PatchCollection
e = Rectangle(xy=(35, -50), width=80, height=80)
fig = plt.gcf()
fig.gca().add_artist(e)
#e.set_clip_box(ax.bbox)
e.set_alpha(0.7)
pylab.xlim([20, 50])
pylab.ylim([-65, -35])
%matplotlib inline
import pylab
import matplotlib.pyplot as plt
pylab.plot([20,50],[40,100])
pylab.plot([50,70],[100,40])
pylab.plot([20,70],[40,40])
%matplotlib inline
import pylab
import matplotlib.pyplot as plt
#Tkinter package is used for graphics
from matplotlib.patches import Rectangle
from matplotlib.collections import PatchCollection
e = Rectangle(xy=(35, -50), width=80, height=80)
fig = plt.gcf()
fig.gca().add_artist(e)
#e.set_clip_box(ax.bbox)
e.set_alpha(0.7)
pylab.xlim([20, 50])
pylab.ylim([-65, -35])
%matplotlib inline
import pylab
import matplotlib.pyplot as plt
#Tkinter package is used for graphics
from matplotlib.patches import Rectangle
from matplotlib.collections import PatchCollection
e = Rectangle(xy=(35, -50), width=80, height=80)
fig = plt.gcf()
fig.gca().add_artist(e)
#e.set_clip_box(ax.bbox)
e.set_alpha(0.7)
pylab.xlim([20, 50])
pylab.ylim([-65, -35])
%matplotlib inline
import pylab
cir = pylab.Circle((.5,.5),radius = 0.25)
ax =pylab.axes(aspect=1)
ax.add_patch(cir)
%matplotlib inline
import pylab
cir = pylab.Circle((.5,.5),radius = 0.25)
rect = pylab.Rectangle([5,5],1,1)
ax =pylab.axes(aspect=1)
ax.add_patch(cir)
ax.add_patch(rect)
%matplotlib inline
import pylab
cir = pylab.Circle((.5,.5),radius = 0.5)
ax =pylab.axes(aspect=1)
ax.add_patch(cir)
import turtle
turtle.left(90)
turtle.forward(50)
i=0
while i < 180:
turtle.forward(1)
turtle.left(1)
i+=1
turtle.forward(150)
turtle.left(90)
turtle.forward(250)
turtle.left(90)
turtle.forward(100)
turtle.left(90)
turtle.forward(140)
#you will see similar output as shown below
%matplotlib inline
import numpy as np
from matplotlib import pyplot as plt
OX = [1,2,3,4]
OY = [200,590,670,435]
fig = plt.figure()
width = .35
ind = np.arange(len(OY))
plt.bar(ind, OY)
plt.xticks(ind + width / 2, OX)
fig.autofmt_xdate()
%matplotlib inline
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
for c, z in zip(['r'], [200,590,670,435]):
xs = np.arange(20)
ys = np.random.rand(20)
ax.bar(xs, ys, zs=z)
ax.set_xlabel('X')
ax.set_ylabel('Y')
ax.set_zlabel('Z')
plt.show()
%matplotlib inline
from pylab import *
# make a square figure and axes
figure(1, figsize=(6,6))
ax = axes([0.1, 0.1, 0.8, 0.8])
# The slices will be ordered and plotted counter-clockwise.
sales = [200, 590, 670, 435]
explode=(0, 0.05, 0, 0)
pie(sales, explode=explode,
autopct='%1.1f%%', shadow=True, startangle=90)
# The default startangle is 0, which would start
# the Frogs slice on the x-axis. With startangle=90,
# everything is rotated counter-clockwise by 90 degrees,
# so the plotting starts on the positive y-axis.
show()
import turtle
i=0
while i < 360:
turtle.forward(3)
turtle.left(3)
i+=3
turtle.penup()
turtle.forward(200)
turtle.pendown()
i=0
while i < 360:
turtle.forward(3)
turtle.left(3)
i+=3
turtle.penup()
turtle.forward(100)
turtle.left(90)
turtle.forward(50)
turtle.pendown()
turtle.forward(100)
turtle.left(90)
turtle.forward(400)
turtle.left(90)
turtle.forward(100)
turtle.right(90)
turtle.forward(100)
turtle.right(90)
turtle.forward(150)
turtle.right(90)
turtle.forward(100)
turtle.left(90)
turtle.forward(50)
turtle.right(90)
turtle.forward(400)
turtle.right(90)
turtle.forward(50)
turtle.left(90)
turtle.forward(50)
turtle.right(90)
turtle.forward(100)
turtle.left(90)
turtle.forward(100)
#you will see similar output as shown below