Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4003efd

Browse files
Merge pull request #1075 from Khushi-sharma07/main
Pie Chart Creator
2 parents d68b1a9 + d258586 commit 4003efd

File tree

6 files changed

+51
-0
lines changed

6 files changed

+51
-0
lines changed
132 KB
Loading[フレーム]
138 KB
Loading[フレーム]
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Pie Chart Creator
2+
3+
# Aim
4+
To create a pie chart visualisation of the data entered.
5+
6+
# Purpose
7+
This is a basic python script, here the user will enter the data and the data headings then the program will run and the pie chart view will be created.
8+
9+
# Detailed Instructions
10+
The user should first install all the packages mentioned in requirements.txt. Then enter the no. of elements, data and data headings, and press Enter. A message will be displayed saying "Your pie chart is ready." and can see it in the output screen.
11+
12+
# Screenshot
13+
14+
![Pie Chart Creator](Media/Screenshot1.png)
15+
16+
![Pie Chart Creator](Media/Screenshot2.png)
17+
18+
# Author
19+
20+
Khushi Sharma
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Import libraries
2+
from matplotlib import pyplot as plt
3+
#import numpy as np
4+
5+
lst=[]
6+
# Creating dataset
7+
n = int(input("Enter the number of elements you want in pie chart: "))
8+
9+
# iterating till the range
10+
print("Enter the data headings you want in pie chart: ")
11+
for i in range(0, n):
12+
ele = (input())
13+
lst.append(ele)
14+
15+
lst1=[]
16+
# Creating dataset
17+
# iterating till the range
18+
print("Enter the values in number for the data: ")
19+
for i in range(0, n):
20+
ele1 = int(input())
21+
lst1.append(ele1)
22+
23+
print("Your pie chart is ready!!")
24+
# Creating plot
25+
fig = plt.figure(figsize =(10, 7))
26+
plt.pie(lst1, labels = lst)
27+
28+
# show plot
29+
plt.show()

‎BasicPythonScripts/Pie Chart Creator/requirements.txt

Whitespace-only changes.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import cv2
2+
import numpy

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /