Matplotlib Tutorial (Part 3): Pie Charts

Поділитися
Вставка
  • Опубліковано 21 сер 2024

КОМЕНТАРІ • 89

  • @coreyms
    @coreyms  5 років тому +50

    I hope everyone finds this video helpful. The next video of the series will be posted tomorrow at the same time. The next video will cover how to create stack plots.
    I'd like to thank Brilliant for sponsoring this series. If you'd like to check them out then you can sign up with this link and get 20% off your premium subscription:
    brilliant.org/cms

    • @coreyms
      @coreyms  5 років тому +2

      @@marthalanaveen Not at the moment, but I'll be doing more plotting videos in the future and will cover libraries like that

    • @mallusreddy
      @mallusreddy 5 років тому

      Sir it's really useful... Thank you so much for very informative videos.. ...

    • @vjmannem3678
      @vjmannem3678 3 роки тому

      @@coreyms thanks for all the videos and work you have been doing.
      How did you copy the color hex values in commented section (column) and replace them in list (6:45 min)

    • @robertedmonds9396
      @robertedmonds9396 3 роки тому

      How did you do that selection of the four hex values and then replace the four colors? I can't figure out the key combo.

    • @robertedmonds9396
      @robertedmonds9396 3 роки тому

      And of course, two minutes after I posted the question, I figured it out: Alt+Click. Great series, btw.

  • @programmer4833
    @programmer4833 4 роки тому +6

    I don't know how to express the fact these tutorials are so clear, nice, well explained, structured and your way of explaining is so helpful ! Thank you very much for your series and all other videos that you make to help us. The community you have is truly awesome and I am proud of being part of it (sorry for my english).

  • @EwaWastingTime
    @EwaWastingTime 5 років тому +34

    Pie charts are rarely a good plot choice. For most cases bar chart works better as it is easier to make comparisons between categories of similar size on it. In statistics usage of pie charts is discouraged, although managers do love them :)

    • @coreyms
      @coreyms  5 років тому +29

      I agree. I wanted to show how they're made since they're popular for presentations, but I would almost always recommend a bar chart instead. I mentioned it slightly in the video, but perhaps I should have emphasized that a bit more.

    • @achyuthramachandran2189
      @achyuthramachandran2189 4 роки тому +3

      Yes. Moreover, pie charts cannot be used for data with overlaps, such as the data used in this video. A dev can use more than one programming language. The video is excellent for demonstration purposes and is very informative, but this should have been mentioned IMHO.

    • @MrCmon113
      @MrCmon113 4 роки тому +4

      In my opinion pie charts should be used to compare quantities to a total.
      Ie above it doesn't make sense, because the total doesn't mean anything.

    • @realnice3672
      @realnice3672 3 роки тому

      @@MrCmon113 you are right , ma men

    • @sarikadatta3706
      @sarikadatta3706 2 роки тому

      @@coreyms Can’t agree more. Bar charts and box charts are a better choice, I though I was the only one find Pie chart to be not a good choice

  • @charliewavra8480
    @charliewavra8480 2 роки тому +2

    I'm just learning Python and preparing for the final projects. Your video included most of the information/guide I needed to plot my chart in. It's a big thanks from me :)

  • @the-ghost-in-the-machine1108
    @the-ghost-in-the-machine1108 Рік тому +3

    brilliant work :D

  • @jaredsimons2367
    @jaredsimons2367 5 років тому +4

    Perfect timing, Corey! You've been my go-to for learning individual Python libraries and this series came up just in time for the current project I'm working on. I can't thank you enough!

  • @LLlikeme
    @LLlikeme 4 роки тому +4

    I have seen 3 videos of this series and this series is awesome! Thank you for sharing this content.

  • @priyamrani1
    @priyamrani1 5 років тому +6

    You started posting this series just when I needed it! Your tutorials are always super insightful and comprehensive. Keep up the good work.

  • @jiangxu3895
    @jiangxu3895 4 роки тому +1

    The most colorful and enjoyble tutorial. Many thanks!

  • @amanrastogi1232
    @amanrastogi1232 5 років тому +29

    Thanks again..colorful tut :) ...Do you have any plan for numpy, pandas, scikit-learn library?

  • @silentking5559
    @silentking5559 Рік тому

    Great video, so helpful! I don't know why everyone doesn't learn coding with free resources of this calibre available.

  • @s.mohammadmousavi4684
    @s.mohammadmousavi4684 3 роки тому

    You're tutorials are awsomw, they are really insightful and somehow you make it really fun to learn, thank you so much.

  • @balajiverma.sc-arn-2536
    @balajiverma.sc-arn-2536 2 роки тому +1

    One of the best explanation

  • @SleepyAizawa69
    @SleepyAizawa69 7 місяців тому

    I love your courses ... they are well explained ... please land cool courses like this more and more🎉

  • @rutviktak716
    @rutviktak716 4 роки тому +1

    You are definitely making a change👍
    Thanx bro

  • @akira_asahi
    @akira_asahi Рік тому

    Thank you for the video. I am grateful for your time and contribution. Kind regards, Akira.

  • @danielalegriasallo5551
    @danielalegriasallo5551 3 роки тому

    Learning so much from your tutorials, thanks.

  • @mohamedibrahimadam5585
    @mohamedibrahimadam5585 5 років тому +1

    Thanks a lot Corey, very helpful

  • @iniyaa6255
    @iniyaa6255 8 місяців тому

    That was a really well done tutorial!

  • @notabibliophile1518
    @notabibliophile1518 Рік тому

    Very good explanation Corey!

  • @davel9130
    @davel9130 3 роки тому

    Excellent work as always. I've been using Matplotlib for quite some time and am still learning new things with your vids. FYI, you mentioned that you thought the start angle may be arbitrary. I believe that MPL always starts at the X axis (East) and rotates counterclockwise (anti-clockwise).

  • @mallusreddy
    @mallusreddy 5 років тому +1

    Wow part3 was so colorful..

  • @elowenwong3164
    @elowenwong3164 2 роки тому

    My life saver

  • @bobjime510
    @bobjime510 5 років тому +3

    ربي يوفقك وشكرا اخي
    good lock brother

  • @joaopedrofavoretti7905
    @joaopedrofavoretti7905 3 роки тому +1

    Awesome video!

  • @strade740
    @strade740 8 місяців тому

    great explanation

  • @EddyCaffrey
    @EddyCaffrey 5 років тому +1

    Part 3.cool like always

  • @dbaker280
    @dbaker280 5 років тому +2

    I love pie

  • @eddisonlewis8099
    @eddisonlewis8099 2 роки тому

    The tutorial is very insightful

  • @karishmakaris7165
    @karishmakaris7165 4 роки тому +1

    ty Corey🙂

  • @adimasmudi5390
    @adimasmudi5390 3 роки тому

    That's very nice explanation, I like it so much

  • @angelhc4757
    @angelhc4757 Місяць тому

    Beautiful 🤩

  • @ashutoshshukla3465
    @ashutoshshukla3465 2 роки тому

    Just awesome..loved it

  • @parthrawri3001
    @parthrawri3001 4 роки тому +1

    Please make content on NumPy and Scikit - learn libraries as well! 🤩

  • @parthrawri3001
    @parthrawri3001 4 роки тому +1

    I like his videos before watching. 😂

  • @abdelrahmanali4550
    @abdelrahmanali4550 3 роки тому

    Almost 60k views and less than 2k likes? c'mon guys support Corey!

  • @sarbazkhurasani
    @sarbazkhurasani 4 роки тому +1

    thanks again, I'm learning this on 11.june.2020 exactly one yar later. :))

  • @anujmore7547
    @anujmore7547 4 роки тому

    Superb Tutorial

  • @alexanderten5497
    @alexanderten5497 5 років тому +1

    Thank you

  • @abhinav9561
    @abhinav9561 3 роки тому

    Thanks man!!

  • @greggs2444
    @greggs2444 5 років тому

    Thank you very helpful

  • @dhananjaykansal8097
    @dhananjaykansal8097 5 років тому +1

    Lovely sir :)

  • @karthiavenger4577
    @karthiavenger4577 4 роки тому

    My only one request please make videos in light background it's very difficult to seee and go through the video other than that love you Corey 💓

  • @chiragpalan9780
    @chiragpalan9780 3 роки тому +1

    I really enjoied the lecture and understood every thing, but i have very funadamental doubt, why to use matplotlib for ploting? we have excel no. Is there any specific reason to use matplotlib? or it is just as an alternative. Does matplotlib have any advantage over excel?

  • @ziadtarek633
    @ziadtarek633 3 роки тому

    hey man if I could give you a nobel peace prize, I'll do it without hesitation

  • @umesh4040
    @umesh4040 4 роки тому +1

    Bloody Corey fucking Schafer. ... Thank you for this. You are the best teacher. Thank you thank you

  • @ikhairi83
    @ikhairi83 5 років тому

    correct me if im wrong. i think they use horizontal line to right as zero degree angle. counting counterclockwise. its quite common in math

  • @praveensequeira1525
    @praveensequeira1525 5 років тому

    awesome content as usual Corey! Can you please tell me the differences between Seaborn and Matplotlib? Is the knowledge learned in this series is still relevant if one has to only use Seaborn as the library. That might be the case, but thought I'll double check with you.

  • @neiljohn2637
    @neiljohn2637 2 роки тому

    Done

  • @MrCmon113
    @MrCmon113 4 роки тому

    Imo pie charts are good for comparing single quantities to the total.
    Ie I wouldn't use a pie chart if the total doesn't mean anything. But if it means something, I think it's ok to have more than five quantities.

  • @vwap9006
    @vwap9006 3 роки тому

    i LOVE you!

  • @oluwaseunsorinola7039
    @oluwaseunsorinola7039 Рік тому +1

    Please start python DSA on UA-cam.

  • @miaomiao2454
    @miaomiao2454 4 роки тому

    Other than creating a flag column to indicate which are the "Others", is there another way of just visualizing the top 3 and grouping everything else in "Others" in pie chart?

  • @sanjeetmohanty3894
    @sanjeetmohanty3894 3 роки тому

    Hi Corey, Thanks for the wonderful tutorials, learned and learning a lot from you!!
    I have weather data, I created a column of seasons that is 'Summer, Spring, Autumn and Winter' based on the dates, now I want to create a pie chart for number of days for each season, with the season and number of days as labels. How do you reckon we do this?

  • @akshaychavan7675
    @akshaychavan7675 5 років тому

    awesome

  • @AudeJavel12
    @AudeJavel12 4 роки тому

    very nice video Corey! I would like to ask you, how to change the background color ? I'm struggling with this...thanks a lot

  • @siddharthaaddy7401
    @siddharthaaddy7401 4 роки тому

    Can u plss make a tutorial series on seaborn?

  • @SoftwareEngineering226
    @SoftwareEngineering226 Рік тому

    Data which you have used is not in the description

  • @boskovic234
    @boskovic234 2 роки тому

    for example i have 30 items to show in pie, how can i set color automatically ? rather than i define one by one... thx in advance (i knew you already told that pie is not good for show many data.. hehe)

  • @xSuzakuux
    @xSuzakuux Рік тому

    Is there any way to change the color of the background?

  • @michaelherweg7421
    @michaelherweg7421 Рік тому

    How do you do the multicopy thing?

  • @jaredwsavage
    @jaredwsavage Рік тому +1

    Good rule of thumb: don't use pie charts if you have more than zero items.

  • @nikhilgoud9019
    @nikhilgoud9019 3 роки тому

    How can we add a legend to the pie chart to mention some details about the pie chart

  • @ashish-blessings
    @ashish-blessings 3 роки тому

    6:07 Haha :)

  • @takachi3174
    @takachi3174 Рік тому

    i wan to change the place of the percentage text pls hlp me : )

  • @nirajsathe9220
    @nirajsathe9220 3 роки тому

    Data set is not downloading

  • @kishoreandra
    @kishoreandra 5 років тому

    Hey Corey is there a 3d pie chart ?? .....

  • @ajitkumarpandey4310
    @ajitkumarpandey4310 4 роки тому

    Sir please can you help me to disable xkcd command

  • @girishjahagirdar4379
    @girishjahagirdar4379 3 роки тому

    Hi Corey,
    I tried exactly same code what is in your tutorial and with same data. I am getting below error
    TypeError: unsupported operand type(s) for -: 'str' and 'float'
    import csv
    from collections import Counter
    from matplotlib import pyplot as plt
    import pandas as pd
    data = pd.read_csv('D:\\code\\data.csv')
    ids=data['Responder_id']
    lang=data['LanguagesWorkedWith']
    language_counter=Counter()
    for responses in lang:
    language_counter.update(responses.split(';'))
    languages=[]
    popularity=[]
    for item in language_counter.most_common(15):
    languages.append(item[0])
    popularity.append(int(item[1]))
    plt.bar(languages,popularity) --> This line is problem and not sure why it is considering popularity list as string . Could you please help ?
    Thanks,
    Girish

  • @hadimasri420
    @hadimasri420 5 років тому

    hello mr corey i want to ask you and hope u reply: if i learn matplotlib or opencv, can i get a job with it?(remote job) cuz there are no jobs in my country and im a python dev. and i want to work online, hope you help me mr.
    thanks❤❤

    • @coreyms
      @coreyms  5 років тому +1

      It could definitely help. Data Science is becoming a very popular field and knowing how to plot and graph data like this will be in high demand.

    • @hadimasri420
      @hadimasri420 5 років тому

      @@coreyms okay thanks

    • @hadimasri420
      @hadimasri420 5 років тому

      @@coreyms is matplotlib good for AI/ML?
      i apologise that I'm asking a lot..

  • @SteveALE-or4yr
    @SteveALE-or4yr 5 років тому

    Hello, video is great. Can you teach me how to fix multiple letter like your way invideo at 6:37. Thank you #Coreythebest

    • @dummy7150
      @dummy7150 5 років тому

      hold ctrl while placing cursors

  • @peterosoo5668
    @peterosoo5668 5 років тому +1

    first here
    give me LIKES to appreciate Corey