<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Habib </title>
    <description>The latest articles on Forem by Habib  (@habibcseju).</description>
    <link>https://forem.com/habibcseju</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F364337%2F3bb9545d-edc9-4fd4-ab1b-eeec8ce1e385.png</url>
      <title>Forem: Habib </title>
      <link>https://forem.com/habibcseju</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/habibcseju"/>
    <language>en</language>
    <item>
      <title>How to create posts for Hugo theme toha</title>
      <dc:creator>Habib </dc:creator>
      <pubDate>Sun, 13 Sep 2020 22:36:48 +0000</pubDate>
      <link>https://forem.com/habibcseju/how-to-create-posts-for-hugo-theme-toha-10i2</link>
      <guid>https://forem.com/habibcseju/how-to-create-posts-for-hugo-theme-toha-10i2</guid>
      <description>&lt;p&gt;First, we need to understand how to create a post then we will be able to create categories.&lt;/p&gt;

&lt;h2&gt;
  
  
  Post Creation:
&lt;/h2&gt;

&lt;p&gt;To create a post in your blog first you need to go to the folder named &lt;code&gt;posts&lt;/code&gt;. Here, create a file &lt;code&gt;_index.md&lt;/code&gt;(The file name has to be exactly the same as it is mentioned). Then open the file and add below lines: &lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
title: "Posts"
---  
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;now, save and close the file. Now, Suppose, you want to write a post. First, create a file, name it with a markdown extension at the end. For example: we've created a file named &lt;code&gt;analytics-and-comments.md&lt;/code&gt; and added the below lines of contents: &lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
title: "Analytics and Comments"
date: 2020-06-08T06:00:23+06:00
hero: /images/posts/writing-posts/analytics.svg
description: Adding analytics and disquss comment in hugo 
theme Toha
menu:
  sidebar:
    name: Analytics &amp;amp; Comments
    identifier: analytics-and-comments
    weight: 500
---

### Complete Post Coming Soon...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;As we know that, the header part of this file which starts and ends with 3 horizontal hyphen(&lt;code&gt;---&lt;/code&gt;) is called the front-matter and every blog post that we write needs to be a front matter included there. Let's understand what are the parameters actually mean: &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;title:&lt;/strong&gt; This is the title of your post. &lt;br&gt;
&lt;strong&gt;date:&lt;/strong&gt; This is the time that shows the posting time of your blog. The first portion is in the &lt;code&gt;year-month-date format&lt;/code&gt;. You can edit the date and time as you wish.&lt;br&gt;
&lt;strong&gt;hero:&lt;/strong&gt; Here, you need to include the location path of the cover photo of your post. Go to the &lt;code&gt;static&lt;/code&gt; folder and create a folder named &lt;code&gt;images&lt;/code&gt;(If you don't have) then inside this folder create another folder called &lt;code&gt;posts&lt;/code&gt; and inside this, we created a folder named &lt;code&gt;writing-posts&lt;/code&gt; where we put the image file &lt;code&gt;analytics.svg&lt;/code&gt;. Now copy the path and add it to the &lt;code&gt;hero&lt;/code&gt; parameter as mentioned above. &lt;br&gt;
&lt;strong&gt;description:&lt;/strong&gt; Add any description you like.&lt;br&gt;
&lt;strong&gt;menu:&lt;/strong&gt; This section contains another parameter called &lt;code&gt;sidebar&lt;/code&gt; which actually displays how the file structure in the sidebar is going to look, and under this we have:&lt;br&gt;
&lt;strong&gt;name:&lt;/strong&gt; This defines what would be the name of the document in sidebar file hierarchy. &lt;br&gt;
&lt;strong&gt;identifier:&lt;/strong&gt; This helps to distinguish the file from other files and helps in terms of category creation. &lt;br&gt;
&lt;strong&gt;weight:&lt;/strong&gt; A value is assigned to this param as a weight value and for multiple files, the documents will appear in the file hierarchy based on this weight value in ascending order.&lt;br&gt;
&lt;br&gt;
after the front-matter, you can write any content following the markdown rules.&lt;br&gt;
The following image shows how the contents of &lt;code&gt;analytics-and-comments.md&lt;/code&gt; are mapped into the sidebar section. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--v82nr-Hz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5klx1docgxewhxeo9sgi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--v82nr-Hz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5klx1docgxewhxeo9sgi.png" alt="Image1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In the above figure- Features, Installation, Configuration, Writing Posts, Customizing, Short Codes, etc are folders created just for other posts.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  Category Creation:
&lt;/h2&gt;

&lt;p&gt;As we have created one &lt;code&gt;_index.md&lt;/code&gt; file and one blog post markdown file previously, now to create a category, we need to create a folder. We created a folder called &lt;code&gt;deploy-site&lt;/code&gt; and inside this folder, we again need to create a &lt;code&gt;_index.md&lt;/code&gt; file which contains the front-matter as below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
title: Deploy Site
menu:
  sidebar:
    name: Deploy Site
    identifier: deploy-site
    weight: 300
---
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The meaning of each parameter in the above code block has been discussed earlier. Just, for the time being, keep in mind that we are going to create the category name as &lt;code&gt;deploy-site&lt;/code&gt; that's why we included it as an identifier in this &lt;code&gt;_index.md&lt;/code&gt; file but you can give any name you want. Next, we are going to create a markdown file called &lt;code&gt;github-pages.md&lt;/code&gt; which will be our blog post file for this folder. Our &lt;code&gt;github-pages.md&lt;/code&gt; includes the following lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
title: "Deploy site in Github Pages"
date: 2020-06-08T06:00:20+06:00
hero: /images/posts/writing-posts/git.svg
menu:
  sidebar:
    name: Github Pages
    identifier: deploy-site-github
    parent: deploy-site
    weight: 10
---
### Complete Post Coming Soon...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;We already know about the parameters used here, but we have one new parameter this time included which is &lt;code&gt;parent&lt;/code&gt; and If we notice we will understand that the value of this param and the value of &lt;code&gt;identifier&lt;/code&gt; param in the &lt;code&gt;_index.md&lt;/code&gt; file inside this folder are both the same. We have to be careful that both of these parameter value matches. Now, you can add as many posts and categories as you want following the above-mentioned procedure. This is how we create categories. &lt;/p&gt;

&lt;p&gt;The following image shows how the contents are mapped into the sidebar section. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wQVMsiGF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cso16yy6wf89eywgbufb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wQVMsiGF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cso16yy6wf89eywgbufb.png" alt="Image2"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to change the default author name from &lt;code&gt;Jane Doe&lt;/code&gt; to your preferred one then go to the folder called &lt;code&gt;layouts&lt;/code&gt; then &lt;code&gt;partials&lt;/code&gt; then &lt;code&gt;helpers&lt;/code&gt; then open &lt;code&gt;get-author-name.html&lt;/code&gt; and edit the name there.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to configure custom Namecheap domain to GitHub Pages</title>
      <dc:creator>Habib </dc:creator>
      <pubDate>Thu, 20 Aug 2020 20:17:55 +0000</pubDate>
      <link>https://forem.com/habibcseju/how-to-configure-custom-namecheap-domain-to-github-pages-5h3</link>
      <guid>https://forem.com/habibcseju/how-to-configure-custom-namecheap-domain-to-github-pages-5h3</guid>
      <description>&lt;p&gt;GitHub provides you the chance to host your website via &lt;code&gt;username.github.io&lt;/code&gt; domain. But if you have a custom domain then you can also configure that with GitHub. Today, I'm about to show you how you can add your &lt;strong&gt;Namecheap&lt;/strong&gt; domain to GitHub. If you have not any Namecheap domain then you certainly can have for free like I got. Just apply to &lt;a href="https://education.github.com/pack" rel="noopener noreferrer"&gt;GitHub student dev&lt;/a&gt; pack and grab one. Okay, first thing first. First you have to create an account in Namecheap. I am assuming that you already hosted your site in GitHub. Now, open your home page in Namecheap. You'll have a page like below. &lt;br&gt;
&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbskdn7o1qf8rcynd6hrx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbskdn7o1qf8rcynd6hrx.png" alt="Dashboard"&gt;&lt;/a&gt;&lt;br&gt;
Next, click &lt;code&gt;manage&lt;/code&gt; to go to the next page. There, after scrolling a bit, you'll get a section like below. Select &lt;code&gt;Namecheap BasicDNS&lt;/code&gt; from there.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fi9uvetykfl3x03s51ibj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fi9uvetykfl3x03s51ibj.png" alt="BasicDNS"&gt;&lt;/a&gt;&lt;br&gt;
In that page, at the top click to &lt;code&gt;Advanced DNS&lt;/code&gt; tab. You will have some records field to add there. Click the &lt;code&gt;Add New Record&lt;/code&gt; button and Add 5 records like the image below:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F7dosjkc38n3brd9dpzzg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F7dosjkc38n3brd9dpzzg.png" alt="adding records"&gt;&lt;/a&gt;&lt;br&gt;
Select &lt;code&gt;CNAME record&lt;/code&gt; in the first column of row 1 and select &lt;code&gt;A Record&lt;/code&gt; for the rest. In column 3 of the first row(CNAME record), Instead of &lt;code&gt;HabibRh26.github.io&lt;/code&gt;(which is my repo name where I hosted my site), use your's and select &lt;code&gt;Automatic&lt;/code&gt; for column 4 entry. Next, you have to add 4 entries where you have to choose &lt;code&gt;@&lt;/code&gt; for column 2 entry, distinct IP address(for GitHub) for column 3 entry, and &lt;code&gt;Automatic&lt;/code&gt; for the last column. Use the IP addresses same as to me or you can search in Google. Now, you are almost done. Just go to the GitHub Repo where you hosted your site. Select the &lt;code&gt;settings&lt;/code&gt; tab at the top right keep scrolling until you find the box &lt;code&gt;Custom domain&lt;/code&gt;. Just add your domain that you got from Namecheap. Don't forget to put &lt;code&gt;www&lt;/code&gt; before the domain. So, It'd be like this for example- &lt;a href="http://www.username.me" rel="noopener noreferrer"&gt;www.username.me&lt;/a&gt;. Click &lt;code&gt;Save&lt;/code&gt; and &lt;code&gt;Enforce HTTPS&lt;/code&gt;. Congratulations! You're done. Go to your domain URL and Enjoy!. Warning! It may take 24 hrs for GitHub to reflect the changes you've made. So, be patient. Be amazed at your personal site. 😁&lt;/p&gt;

</description>
      <category>github</category>
      <category>namecheap</category>
      <category>domain</category>
      <category>personalwebsite</category>
    </item>
    <item>
      <title>Exploring the Basics of Pie Chart in Matplotlib</title>
      <dc:creator>Habib </dc:creator>
      <pubDate>Fri, 01 May 2020 19:59:16 +0000</pubDate>
      <link>https://forem.com/habibcseju/exploring-the-basics-of-pie-chart-in-matplotlib-224i</link>
      <guid>https://forem.com/habibcseju/exploring-the-basics-of-pie-chart-in-matplotlib-224i</guid>
      <description>&lt;p&gt;Do you feel exciting with &lt;strong&gt;Pie Chart&lt;/strong&gt; that you learned in High School but struggling to work in &lt;strong&gt;Matplotlib&lt;/strong&gt;? Well, In this tutorial we are going to have a look at this very popular type of chart plotting. Let's begin.&lt;/p&gt;

&lt;p&gt;First, we need to import pyplot,then we just took a list called slices and plotted the info using &lt;code&gt;plt.pie()&lt;/code&gt; function.:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import matplotlib.pyplot as plt
plt.style.use('fivethirtyeight')
slices = [60,40]
plt.pie(slices)
plt.title('My Demo pie chart')
plt.tight_layout()
plt.savefig('pie1.png')
plt.show()
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The output looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zBRl-WyB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0wibpennndd1l04rq748.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zBRl-WyB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0wibpennndd1l04rq748.png" alt="pie image1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Though this graph has been divided into two sections but we can not get any further information from this. So, we can add labels to this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import matplotlib.pyplot as plt
plt.style.use('fivethirtyeight')
slices = [60,40]
labeling = ['sixty','forty']
plt.pie(slices,labels=labeling)
plt.title('My Demo pie chart')
plt.tight_layout()
plt.show()
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;To add labels, we've just assigned the strings we want to add as labels in a variable named labeling and passed it through the &lt;code&gt;plt.pie()&lt;/code&gt; function. The output looks like this:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rMQdwI_a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/wlihyj0bfxn3qh4r5nva.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rMQdwI_a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/wlihyj0bfxn3qh4r5nva.png" alt="pie img2"&gt;&lt;/a&gt;&lt;br&gt;
we can also add an edge or border covering the whole circle and on the section line. To add this, we just need to pass &lt;code&gt;wedgeprops={'edgecolor':'yellow'}&lt;/code&gt; as an additional parameter where the color is also defined.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;plt.pie(slices,labels=labeling,wedgeprops={'edgecolor':'yellow'})
plt.title('My Demo pie chart')
plt.tight_layout()
plt.show()
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;the output:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PE71C1dS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/kd9dyhk8jq628gls4it9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PE71C1dS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/kd9dyhk8jq628gls4it9.png" alt="pie img3"&gt;&lt;/a&gt;&lt;br&gt;
We can also play with different colors in this graph:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;plt.style.use('fivethirtyeight')
slices = [60,40,30,20]
labeling = ['sixty','forty','thirty','twenty']
colorss = ['yellow','blue','red','green']
plt.pie(slices,labels=labeling,colors=colorss,wedgeprops={'edgecolor':'black'})
plt.title('My Demo pie chart')
plt.tight_layout()
plt.show()
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;To add this, we need to pass additional parameters like &lt;code&gt;colorss&lt;/code&gt; variable which contains the colors we will add here as strings. Notice, before this, we've also added two extra parameters in our slices variable and took an extra variable named &lt;code&gt;labeling&lt;/code&gt; which is also passed to &lt;code&gt;plt.pie()&lt;/code&gt; function. Now if we run this, we will see:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ktB34LLs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/dbcejdqmys6sknq43n4p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ktB34LLs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/dbcejdqmys6sknq43n4p.png" alt="pie img4"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Emphasizing:&lt;/strong&gt;&lt;br&gt;
we can also emphasize a particular slice in our pie chart by using the &lt;code&gt;explode&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;plt.style.use('fivethirtyeight')
slices = [59219, 55466, 47544, 36443, 35917]
labels = ['JavaScript', 'HTML/CSS', 'SQL', 'Python', 'Java']
explode = [0,0,0,0.1,0]
plt.pie(slices,labels=labels,explode=explode,wedgeprops={'edgecolor':'black'})
plt.title('My Demo pie chart')
plt.tight_layout()
plt.show()
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;in the &lt;code&gt;explode&lt;/code&gt; variable we have some values denoting which circle to be exploded by how much. Like, we've set here the 4th value to be 0.1 which means the slice of python will be exploded in our chart. Let's see the output to understand:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kwmrtv01--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/m7if393dwqflh0hr4pny.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kwmrtv01--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/m7if393dwqflh0hr4pny.png" alt="pie img5"&gt;&lt;/a&gt;&lt;br&gt;
We can also add a shadow on this and rotate the chart by some margins. To do this, we need to pass &lt;code&gt;shadow&lt;/code&gt; and &lt;code&gt;startangle&lt;/code&gt; attributes with values as parameters to the &lt;code&gt;plt.pie()&lt;/code&gt; function.Code for this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;plt.style.use('fivethirtyeight')
slices = [59219, 55466, 47544, 36443, 35917]
labels = ['JavaScript', 'HTML/CSS', 'SQL', 'Python', 'Java']
explode = [0,0,0,0.1,0]
plt.pie(slices,labels=labels,explode=explode,shadow=True,startangle=90,wedgeprops={'edgecolor':'black'})
plt.title('My Demo pie chart')
plt.tight_layout()
plt.show()
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_8FRtxO2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/urvbdrq2dq2nz8ih95yl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_8FRtxO2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/urvbdrq2dq2nz8ih95yl.png" alt="pie img6"&gt;&lt;/a&gt;&lt;br&gt;
So, we can see the python slice is rotated by 90 degrees and a light shadow in the graph.&lt;br&gt;
A very common scenario we see is this kind of graph contains percentages on its slices. We can also add percentage by passing a parameter &lt;code&gt;autopct='%1.1f%%'&lt;/code&gt; to the &lt;code&gt;plt.pie()&lt;/code&gt; function which will display percentage up-to one digit after the decimal point. Let's see the code and output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;plt.style.use('fivethirtyeight')
slices = [59219, 55466, 47544, 36443, 35917]
labels = ['JavaScript', 'HTML/CSS', 'SQL', 'Python', 'Java']
explode = [0,0,0,0.1,0]
plt.pie(slices,labels=labels,explode=explode,shadow=True,startangle=90,autopct='%1.1f%%',wedgeprops={'edgecolor':'black'})
plt.title('My Demo pie chart')
plt.tight_layout()
plt.show()
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NvvTv4Jt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/b4zdkqv0j9ucsdtmwl26.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NvvTv4Jt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/b4zdkqv0j9ucsdtmwl26.png" alt="pie img7"&gt;&lt;/a&gt;&lt;br&gt;
There it is! A standard Pie Chart representation.&lt;br&gt;
Thank you all for being with me in this tutorial. See you next time with something more interesting. Stay Tuned.&lt;/p&gt;

</description>
      <category>python</category>
      <category>matplotlib</category>
      <category>datascience</category>
      <category>datavisualization</category>
    </item>
  </channel>
</rss>
