Matplotlib Animations in Python

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

КОМЕНТАРІ • 113

  • @ChrisadaSookdhis
    @ChrisadaSookdhis 3 роки тому +25

    What's a good way to save these animation as video or gif ?

  • @StephenEhrlichPhotos
    @StephenEhrlichPhotos 3 роки тому +29

    Your Python series is my favorite. I learn from you. I look forward to future Python tutorials.

    • @NeuralNine
      @NeuralNine  3 роки тому +2

      thanks :)

    • @rayenwiller
      @rayenwiller 4 місяці тому

      @@NeuralNine may i ask why does it plot faster after you added an if statement

    • @flowocode
      @flowocode 3 місяці тому +1

      @@rayenwiller it doesn't waste time plotting and so it runs faster

  • @pokegamerspoint6577
    @pokegamerspoint6577 3 роки тому +22

    You have a lot of audience from India

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

    i felt like you are just typing what you are reading. you were like " off course lets reshape it" lol

  • @reivmarmalade
    @reivmarmalade 3 роки тому +2

    your intro music is amazing
    good video btw

  • @RafiqulIslamSarker1337
    @RafiqulIslamSarker1337 2 роки тому +6

    When I do the very first thing you showed here (with x_value, y_values), it plots each of the points in a separate figure in the terminal. Even though I put plt.show() after the loop. Is there any difference in how pycharm and spyder handle plt.scatter() command?

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

      I am using PyCharm and getting the same problem. Did you figure out a solution?

    • @timobrenn
      @timobrenn 9 місяців тому

      If you're using jupyter notebook you can fix this by writing
      %matplotlib qt
      at the top of the cell.
      You should be able to find something somewhere that allows you to change from inline plotting to qt (the gui library) plotting

  • @rihabhoceini7245
    @rihabhoceini7245 10 місяців тому

    this very clear and helpful , thank you

  • @kittoh_
    @kittoh_ Рік тому +4

    Cool! Is there a way to capture the animations besides using a screen recorder?

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

      Python contour animation
      ua-cam.com/video/ZFQwwxyKG_U/v-deo.html

  • @thomasgoodwin2648
    @thomasgoodwin2648 3 роки тому +6

    As long as you keep teaching the things they don't teach in classrooms n other tutorials, I'll keep coming back.
    I love the fact you don't edit out the messy bits of programming, but instead demonstrate the process from 1st principles to working model. Most of the videos out there these days boil down to "Run this Jupyter Notebook on Collab".

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

      thanks for your kind words! :D

  • @Emotekofficial
    @Emotekofficial 2 роки тому +5

    This is very good! A straight up for loop rather than using animate class from mpl. But could you help out how to render or export this animation? Do we have to export all the pictures and do frames/Sec manually for this??

  • @Diamond_Hanz
    @Diamond_Hanz 3 роки тому +2

    nice! i'm so doing this on my project before it's due!

  • @visualgebra
    @visualgebra 3 роки тому +3

    how to save the results in mp4 format ?

  • @sehbanomer8151
    @sehbanomer8151 3 роки тому +3

    I there a way to save the animations as gif?

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

    You are a great teacher.

  • @wko_
    @wko_ 3 роки тому +3

    Thanks for another good project!
    🇧🇷

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

    this is simple and helpful that I feel I need to pay for this video!. Thank you.

  • @cargonriv
    @cargonriv 2 роки тому +1

    Excellent video! Great job explaining this 'niche' skill

  • @marshalljordan2416
    @marshalljordan2416 Рік тому +2

    Thanks for the lesson, Professor. Your teaching is clear and easy to follow.

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

      Python contour animation
      ua-cam.com/video/ZFQwwxyKG_U/v-deo.html

  • @cauchyschwarz3295
    @cauchyschwarz3295 2 роки тому +4

    Why does the plt.clf() not delete the points as well?
    Great video btw.

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

      You're plotting the points in each cycle of the loop, so although you delete them a the start, you plot them again.

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

    Hi, thank you for the video. I tried to follow your steps, but I got a different result. Many figures were generated to update the plot. Do you have any idea why is this happening?
    x_values= [ ]
    y_values= [ ]
    for _ in range(100):
    x_values.append(random.randint(0,100))
    y_values.append(random.randint(0,100))
    plt.xlim(0,100)
    plt.ylim(0,100)
    plt.scatter(x_values, y_values)
    plt.pause(0.001)
    plt.show()

  • @santoshlalwani2503
    @santoshlalwani2503 3 роки тому +2

    i am new to python and i don't even get this , but i still love watching your videos till end

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

    @6:15
    What is that substitute x for y thing?
    How to do it?

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

    Your stockmarket predictor was also pretty cool

  • @JoyKing-rj8rx
    @JoyKing-rj8rx 3 місяці тому +1

    in time 10:29 why the color changes each time

  • @HEXANIME2.0
    @HEXANIME2.0 5 днів тому

    What version of pycharm was this?

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

    7:15 Does anyone know why he used list comprehension instead of just writing the range?

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

    @ 6:02 what is the purpose of x = x.reshape(-1,1); what does that do?

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

      It reshapes the vector basically. -1 means, “hey numpy I don’t care how many rows you make but you have to make sure that I get only 1 column”. Eg: if you have matrix of shape 3,4 and you do matrix.reshape(-1,6). You will end up with a matrix of shape 2,6.

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

      @@imdadood5705 Thank you, so to clarfiy, the -1 in (-1,1) basically subtracts 1 from the m-dimension of the original mxn-matrix?

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

      @@George85677 Not subtract necessarily. It fixes it own dimension by looking the n dimension.
      6,3.reshape(-1,1) would give 18,1
      2,5.reshape(1,-1) would give 1,10
      4,3.reshape(-1,6) would give 2,6
      6,6.reshape(18,-1) would give 18,2
      Do you see the pattern here? It just fills in appropriate value for -1 in all the instances.
      If you have 5,4.reshape(-1,3) this would give you an error, because there is no way you can get 20 elements in a matrix having only three columns.
      I hope I made it clear

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

      @@imdadood5705 Wow, that cleared up a lot. Thank you for your help!

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

      @@imdadood5705 very nice explanation, thanks!

  • @Rapha_Carpio
    @Rapha_Carpio 10 місяців тому

    Do you have more videos about animations im really into that it’s fun and help me to understand arrays and matrix

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

    Matplotlib FuncAnimation appears to use global variables. Is there a way to put the FuncAnimation code in a main() function and call it with :
    if __name__ == "__main__":
    main()

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

    Thank you for this video :]

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

    11:21 - That's a big brain trick, surrounding the _entire thing_ by `if x % 5 == 0` :D But hey, at least you've shown me that `plt.pause(...)` exists, thanks.
    You were looking forward to that 50x speedup, and then... hmmm... "kind of" :D

  • @TR1ckY_TV
    @TR1ckY_TV 3 роки тому +3

    where's your intro from?
    I know that I've heard it somewhere but can't figure it out 🥺

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

      Made it myself. The music is from the UA-cam free audio library

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

    Very nice video, thanks for sharing

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

    Your desktop has clean look👍

  • @s.aravindh6227
    @s.aravindh6227 3 роки тому +1

    Nice video bro 👍👍👍

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

    Really nice video, can you please make more on these topic

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

    Can you explain the reshape command more please

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

    very good and very useful

  • @GermanTopGameTV
    @GermanTopGameTV 6 місяців тому

    My jupyter notebook doesn't update the plot but creates more of it..

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

    whats your pycharm theme?

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

    How can i install that program?

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

    I am trying to create a zodiac chart wheel and animate planets, any tips on what would be the best library to use for the animations?? ...eg. a dot( planets) going around a circle (the zodiac) thanks man

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

    Hey. Id love to replicate this in my interactive VS code notebook, ipynb files, but it doesn't quite work. Has anyone found a solution?

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

    I am getting multiple charts when running this code
    What to do

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

    You are awesome.

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

    Why this animation work in pycharm but doesn't work in Jupiter notebook

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

    Is it possible to save as gif?

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

    Yes men, very nice . How to put the values of the regression line in a dataframe now ? Thnx Bro .👍👍

  • @shreeshaaithal-
    @shreeshaaithal- 3 роки тому +2

    Please make a video on WhatsApp chatbot AI please make this ..
    And also love you videos

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

    Please give me suggestion...
    How can i do this in android python ?
    When i try ....
    This was wrong

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

    How to save these as .gif files?

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

    How do I stop a matplotlib animation? I close it, and it reopens again!

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

    nice initiative!! although, you look more focused on show how much you know Python...

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

    How to save the animation ?

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

    Great video

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

    Very helpful!

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

    You ever heard of animation.FuncAnimation?

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

    Big fan Florian , can u bring some more CPP projects

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

      which project for example?

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

      @@NeuralNine well u r the expert , but something interesting like a password bruteforcer

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

      Do u have a translated version of ur CPP book ? I think it's in Deutsch right ?

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

    Hello, can you please make a video on TCP chat room to chat with other computers on different network in python?

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

      I think I have such a video on my channel already.

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

      @@NeuralNine, yes sir you have a video on TCP chat room but we cannot chat with other computers on different network/LAN.

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

      @@abeermanchanda1168 why not? Whether you use it in the internet or on localhost is not a matter of programming but of firewall settings and ip addresses

    • @mrgamer-lu1im
      @mrgamer-lu1im 3 роки тому

      You need portforwarding

  • @АтанасКостов-к5м
    @АтанасКостов-к5м 3 роки тому

    Good vid

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

    U don't explained many lines in the code what they do exactly unfortunately

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

    How old are you?

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

    Make an pycharm clone

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

    Naice.

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

    Yes i am from India 🇮🇳

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

    🎉

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

    plt.pause() la clave

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

    At first, everyone did not believe in Bitcoin, then in Defi, then in NFT, and now someone really does not believe in the RJVX13 algorithm :D

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

    48fps

  • @Film.önerilerii
    @Film.önerilerii 3 роки тому

    RJVX13 algorithm is my choice, i dont worry about BTC rates at all

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

    is there really still a person who does not know about the existence of RJVX13 algorithm?

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

    RJVX13 algorithm is the best, there is no point in arguing with this

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

    Why worry about cryptocurrency quotes if there is RJVX13 algorithm?

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

    first like!

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

    first comment!

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

    First✨✨✨♥️

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

    Is he talking about that... hahahaha

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

    RJVX13 bring me 300% profit because of Tesla pump

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

    Useless.