<jupyter_start><jupyter_text>---title: "Pie Chart"author: "Sanjay"date: 2020-09-05description: "-"type: technical_notedraft: false---<jupyter_code># Importing Matplotlib library
from matplotlib import pyplot as plt 
# Defining labels 
activities = ['eat', 'sleep', 'work', 'play']
# Portion covered by each label 
slices = [4, 8, 7, 5] 
# Color for each label 
colors = ['r', 'y', 'g', 'b'] 
# Plotting the Pie chart 
plt.pie(slices, labels = activities, colors=colors, startangle=90, shadow = True, explode = (0, 0, 0.1, 0), 
        radius = 1.2, autopct = '%1.1f%%') 

# Plotting legend 
plt.legend() 

# Function to show the plot 
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16, 'fraction_numerical': 0.034074074074074076, 'mean_word_length': 4.495934959349594, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '573532', 'license': 'MIT', 'n_tokens_mistral': 274, 'n_tokens_neox': 250, 'n_words': 72, 'path': 'docs/python/matplotlib/Pie-Chart.ipynb', 'repo_name': 'Sanjay-V/mlnotes', 'size': '675'}