Skip to content

Commit 8f30676

Browse files
authored
Add files via upload
0 parents  commit 8f30676

File tree

10 files changed

+122
-0
lines changed

10 files changed

+122
-0
lines changed

About.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Developer ganesh kavhar https://ganeshmkavhar.000webhostapp.com/

areaplot.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import matplotlib.pyplot as plt
2+
days = [1,2,3,4,5]
3+
4+
sleeping =[7,8,6,11,7]
5+
eating = [2,3,4,3,2]
6+
working =[7,8,7,2,2]
7+
playing = [8,5,7,8,13]
8+
9+
plt.plot([],[],color='m', label='Sleeping', linewidth=5)
10+
plt.plot([],[],color='c', label='Eating', linewidth=5)
11+
plt.plot([],[],color='r', label='Working', linewidth=5)
12+
plt.plot([],[],color='k', label='Playing', linewidth=5)
13+
14+
plt.stackplot(days, sleeping,eating,working,playing, colors=['m','c','r','k'])
15+
16+
plt.xlabel('x')
17+
plt.ylabel('y')
18+
plt.title('Stack Plot')
19+
plt.legend()
20+
plt.show()

ggplot.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
from matplotlib import pyplot as plt
2+
from matplotlib import style
3+
4+
style.use('ggplot')
5+
x = [5,8,10]
6+
y = [12,16,6]
7+
x2 = [6,9,11]
8+
y2 = [6,15,7]
9+
plt.plot(x,y,'g',label='line one', linewidth=5)
10+
plt.plot(x2,y2,'c',label='line two',linewidth=5)
11+
plt.title('Epic Info')
12+
plt.ylabel('Y axis')
13+
plt.xlabel('X axis')
14+
plt.legend()
15+
plt.grid(True,color='k')
16+
plt.show()

graph.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from matplotlib import pyplot as plt
2+
3+
plt.bar([0.25,1.25,2.25,3.25,4.25],[50,40,70,80,20],
4+
label="BMW",width=.5)
5+
plt.bar([.75,1.75,2.75,3.75,4.75],[80,20,20,50,60],
6+
label="Audi", color='r',width=.5)
7+
plt.legend()
8+
plt.xlabel('Days')
9+
plt.ylabel('Distance (kms)')
10+
plt.title('Information')
11+
plt.show()

histogram.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import matplotlib.pyplot as plt
2+
population_age = [22,55,62,45,21,22,34,42,42,4,2,102,95,85,55,110,120,70,65,55,111,115,80,75,65,54,44,43,42,48]
3+
bins = [0,10,20,30,40,50,60,70,80,90,100]
4+
plt.hist(population_age, bins, histtype='bar', rwidth=0.8)
5+
plt.xlabel('age groups')
6+
plt.ylabel('Number of people')
7+
plt.title('Histogram')
8+
plt.show()

multiple-plot.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import numpy as np
2+
import matplotlib.pyplot as plt
3+
4+
def f(t):
5+
return np.exp(-t) * np.cos(2*np.pi*t)
6+
t1 = np.arange(0.0, 5.0, 0.1)
7+
t2 = np.arange(0.0, 5.0, 0.02)
8+
plt.subplot(221)
9+
plt.plot(t1, f(t1), 'bo', t2, f(t2))
10+
plt.subplot(222)
11+
plt.plot(t2, np.cos(2*np.pi*t2))
12+
plt.show()

piechart.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import matplotlib.pyplot as plt
2+
3+
days = [1,2,3,4,5]
4+
5+
sleeping =[7,8,6,11,7]
6+
eating = [2,3,4,3,2]
7+
working =[7,8,7,2,2]
8+
playing = [8,5,7,8,13]
9+
slices = [7,2,2,13]
10+
activities = ['sleeping','eating','working','playing']
11+
cols = ['c','m','r','b']
12+
13+
plt.pie(slices,
14+
labels=activities,
15+
colors=cols,
16+
startangle=90,
17+
shadow= True,
18+
explode=(0,0.1,0,0),
19+
autopct='%1.1f%%')
20+
21+
plt.title('Pie Plot')
22+
plt.show()

ploting.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from matplotlib import pyplot as plt
2+
3+
#Plotting to our canvas
4+
5+
plt.plot([1,2,3],[4,5,1])
6+
7+
#Showing what we plotted
8+
9+
plt.show()

pyplot.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from matplotlib import pyplot as plt
2+
3+
x = [5,2,7]
4+
y = [2,16,4]
5+
plt.plot(x,y)
6+
plt.title('Info')
7+
plt.ylabel('Y axis')
8+
plt.xlabel('X axis')
9+
plt.show()

scatter_plot.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import matplotlib.pyplot as plt
2+
x = [1,1.5,2,2.5,3,3.5,3.6]
3+
y = [7.5,8,8.5,9,9.5,10,10.5]
4+
5+
x1=[8,8.5,9,9.5,10,10.5,11]
6+
y1=[3,3.5,3.7,4,4.5,5,5.2]
7+
8+
plt.scatter(x,y, label='high income low saving',color='r')
9+
plt.scatter(x1,y1,label='low income high savings',color='b')
10+
plt.xlabel('saving*100')
11+
plt.ylabel('income*1000')
12+
plt.title('Scatter Plot')
13+
plt.legend()
14+
plt.show()

0 commit comments

Comments
 (0)