Matplotlib Tutorial (2022): For Physicists, Engineers, and Mathematicians

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 มิ.ย. 2021
  • Check out my course on UDEMY: learn the skills you need for coding in STEM:
    www.udemy.com/course/python-s...
    This from-scratch tutorial on Matplotlib is designed specifically for those studying physics, mathematics, and engineering. Before watching this, you may want to brush up on numpy:
    • NumPy Tutorial (2022):...
    All code can be found here:
    github.com/lukepolson/youtube...
    Join the discord server!
    / discord
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 105

  • @viniciuscerqueirasilva9396
    @viniciuscerqueirasilva9396 2 ปีที่แล้ว +66

    Timestamps:
    00:00 Introduction
    00:50 Making Plots Actually Look Nice
    01:17 Quick Plotting: Line Plots
    09:10 Quick Plotting: Histograms
    12:27 A More Advanced API: Single Axes in one Figure
    14:15 A More Advanced API: Multiple axes in 1 figure
    18:41 Example
    27:00 2D Plots: Filled-in contour plots
    30:33 2D Plots: Contour Plot
    32:12 2D Plots: 3D Surface Plot
    33:40 2D Plots: StreamPlots
    37:55 Image Reading
    38:23 Animations

  • @raviroy7882
    @raviroy7882 2 ปีที่แล้ว +57

    This is quite possibly one of the best channels I have come across to learn Python from Physics POV. I only regret why I didn't find it sooner. Please continue your good work. A lot of thanks to you. (Never have I subscribed to a channel this quickly)

    • @ApteraEV2024
      @ApteraEV2024 8 หลายเดือนก่อน

      Is there a Dark Mode??❤

  • @abhishekjoshi8413
    @abhishekjoshi8413 3 ปีที่แล้ว +41

    man i really appreciate you doing this, i can cannot overemphasize like how the right the timing of me finding the channel and you uploading the video, great work keep them coming

  • @SubhodeepSarkar
    @SubhodeepSarkar 3 ปีที่แล้ว +5

    Great stuff as always, especially liked how you indexed the axes in the subplots. It's a really cool trick and I will be using it from now on!

  • @AAFX-OM
    @AAFX-OM 2 ปีที่แล้ว +3

    These are amazing lectures/tutorials. Really appreciating your time and great work!

  • @Dofoos
    @Dofoos 3 ปีที่แล้ว +9

    THANK YOU! I’ve been trying to quickly learn matplotlib these past few days to finish up a lab report for my internship you have no idea how beautiful your timing is

  • @ameerbux78666
    @ameerbux78666 2 ปีที่แล้ว +2

    You're a life saver. The way you explain things is incredible, out of every single person I've watched, you're the best. Thank you for all the content!

  • @Jack-hk6kl
    @Jack-hk6kl ปีที่แล้ว

    Clear, concise, straight to the point and efficiently fast. You’re godsend bro

  • @Demolin7
    @Demolin7 2 ปีที่แล้ว

    Your channel is amazing, it is incredibly hard to find this level of content even in paid courses. Thanks so much!

  • @niceday2015
    @niceday2015 2 ปีที่แล้ว +1

    Enjoy it very much, not only how to do it, but also how to think before plotting step by step.Thank you very much!

  • @unmeshduttachowdhury
    @unmeshduttachowdhury 3 ปีที่แล้ว +3

    The science style really overcomes a lot of pain in matplotplib. Thank you again

  • @scienceaj2907
    @scienceaj2907 ปีที่แล้ว

    Simple, clear and concise. You are an amazing teacher!

  • @matthewkinahan3945
    @matthewkinahan3945 3 ปีที่แล้ว +11

    Dedication! my mans is uploading while biking

    • @jhawar-ji
      @jhawar-ji 3 ปีที่แล้ว +1

      You were biking along with him?👀

    • @matthewkinahan3945
      @matthewkinahan3945 3 ปีที่แล้ว +2

      @@jhawar-ji nah I bailed on the biking part of the trip

  • @philippe6724
    @philippe6724 3 หลายเดือนก่อน

    Luke is such a great instructor: one can learn numerous concepts in no time!
    Thank you-)

  • @sandeepmandrawadkar9133
    @sandeepmandrawadkar9133 2 ปีที่แล้ว

    That's great help to beginners as well as the expertise. Thanks for super simplifying the concepts.

  • @zhoumin6927
    @zhoumin6927 2 ปีที่แล้ว

    Excellent and fluent! I can learn a lot from your channel, thanks!

  • @benhaenraets4369
    @benhaenraets4369 ปีที่แล้ว

    One of the best vids out there. Subscribed and liked!

  • @DeAngeloYouKnow
    @DeAngeloYouKnow 3 ปีที่แล้ว +1

    Wonderful video my man keep up the good work.

  • @BijouBakson
    @BijouBakson 3 หลายเดือนก่อน

    He's put so much in such a small amount of time it took me around 6 hours to do every single exercise. He is going very fast, but you can pause, slow it down, etc. Helped me a lot.

  • @WalterUnglaub
    @WalterUnglaub ปีที่แล้ว

    Thank you for doing all of this, it's incredibly insightful! Awesome tutorials!

  • @JasleenKaur-hw2tf
    @JasleenKaur-hw2tf ปีที่แล้ว +1

    The best tutorial videos! thank you!

  • @akshaygiram
    @akshaygiram ปีที่แล้ว

    Happy to find you! Hope to see you more!

  • @AJ-et3vf
    @AJ-et3vf 3 ปีที่แล้ว +2

    Awesome man! This is highly useful. Your tutorials are really lucid and informative and makes learning Python enjoyable and fulfilling. I just finished watching this video, but I'll definitely reference this when I need to do things in Matplotlib that I haven't done before like histograms and animations. Highly appreciate the animation part here. You explain it well and make it simple and understandable. Big thanks!

    • @MrPSolver
      @MrPSolver  3 ปีที่แล้ว

      Thank you :)

  • @uorabhishek
    @uorabhishek ปีที่แล้ว

    Nice explanation. Needed exactly what you explained.Thanks for the informative video.

  • @jhawar-ji
    @jhawar-ji 3 ปีที่แล้ว +9

    Tight layout for subplots should also have been included. That's always a plus one

  • @diegoalgo1296
    @diegoalgo1296 2 ปีที่แล้ว

    You're a legend my guy, thank you!

  • @nikossioulas2067
    @nikossioulas2067 2 ปีที่แล้ว

    Awesome tutorial! Thank you!

  • @Achirona16
    @Achirona16 2 ปีที่แล้ว +1

    Great tutorial! I learnt a lot Thanks

  • @Excalibur32
    @Excalibur32 2 ปีที่แล้ว

    Great crash course, thank you!

  • @tlmoller
    @tlmoller ปีที่แล้ว

    This is really good! Thanks a lot.

  • @madhavsirohi2225
    @madhavsirohi2225 ปีที่แล้ว

    Thanks a lot needed this!

  • @AnatolVZ
    @AnatolVZ ปีที่แล้ว

    Thank you for this tutorial!!!!! Very very usefull and simple for undersatanding!!!

  • @danielarisamoraesesilva8485
    @danielarisamoraesesilva8485 ปีที่แล้ว

    Great job man!

  • @Slyracoon666
    @Slyracoon666 2 ปีที่แล้ว +9

    Just began my physics major and I’ve never used python before but your videos are really informative

  • @jacksondienes7710
    @jacksondienes7710 ปีที่แล้ว

    u seriously have the best vids mr.p

  • @hsh7677
    @hsh7677 3 ปีที่แล้ว +1

    Thank you
    Your content is awesome!!!

  • @sergiolucas38
    @sergiolucas38 2 ปีที่แล้ว

    Great video, man, thank you :)

  • @rhliarng
    @rhliarng 2 ปีที่แล้ว

    Great tutorial!!

  • @renegaed
    @renegaed 2 ปีที่แล้ว

    Your videos are the best on TH-cam on this topic. Please do more basics videos. I find it difficult to translate engineering problems to python without getting lost in the maths with multiple variables that can change. More info on standardising such problems to see how each variable will effect the result would be extremely useful.

  • @walkingphilosopher
    @walkingphilosopher 2 ปีที่แล้ว

    I wish I have more than 1 account to like this video at least 5 times. Its very useful. Thanks.

  • @AnatolVZ
    @AnatolVZ 2 ปีที่แล้ว

    Superb content!!

  • @Crilic3
    @Crilic3 ปีที่แล้ว

    ANIMATION! YES!
    I can't believe it took me til end of semester to find a Numpy/Matplotlib animator!!

  • @nobody2937
    @nobody2937 2 ปีที่แล้ว

    Very impressive... Thank you so much...

  • @hectorg.m.3350
    @hectorg.m.3350 ปีที่แล้ว

    Hats off mate!!!

  • @Nooreazy
    @Nooreazy ปีที่แล้ว

    This man is doing gods work.

  • @Icingde4th
    @Icingde4th 3 ปีที่แล้ว +4

    You're the GOAT

  • @dedperded
    @dedperded หลายเดือนก่อน

    thats a gem!

  • @rogerwilcoshirley2270
    @rogerwilcoshirley2270 2 ปีที่แล้ว +1

    Nicely done, i went thru set by step with you (lots of stop and go) programming and studying all your examples as yet another review of MatPlotLib, really very good practice. Only issues for me: could not access those additional styles you mention at beginning, perhaps you could offer more exact details on how to get them loaded/accessible. Also on my ipad can't zoom the video so your code was really tiny, i could read it but if you ever reduce the font it would no longer be legible.

  • @TheDavddd
    @TheDavddd 2 ปีที่แล้ว +1

    Sadly I've spent years of mindless copy pasting from stack overflow and then tweaking the parameters. this video finally made me understand what the hell I was doing :D

  • @alonsorodriguez5613
    @alonsorodriguez5613 ปีที่แล้ว

    Thank you for making this video. Terrific job.
    Is it possible to save the figures while keeping the Science Plots Format you declared at the beginning of your Jupyter notebook?

  • @poxipollepi1
    @poxipollepi1 2 ปีที่แล้ว +1

    How can I use the same text font/style as in the fig.text() at 26:43? The \Delta E gets compiled in italic dejaVu Sans by default and when I try to wrap it in \mathrm{} it just removes the italic and it still doesn't look roman like in the video.

  • @doruk5493
    @doruk5493 2 ปีที่แล้ว

    Thank you for this vid bro. Please make a Seaborn or Plotly version of this.

  • @hadjkouidermohammed1958
    @hadjkouidermohammed1958 3 ปีที่แล้ว

    Thank you for the great video....can you help me to make appear some data values on the curve. thank you..

  • @learnmore_today
    @learnmore_today 3 ปีที่แล้ว +1

    Could you please make a video on Petsc solver, how to install it and use it from A to Z showing a couple of matrix inversion examples. I will be very grateful. Thanks

    • @MrPSolver
      @MrPSolver  3 ปีที่แล้ว

      I'll take a look at it!

  • @fatemehlangari4921
    @fatemehlangari4921 2 ปีที่แล้ว

    Thank youuu. Do you have any idea about creating a semantic graph? (an unweighted undirected graph)

  • @pavankumarkv4920
    @pavankumarkv4920 2 ปีที่แล้ว

    Thanks man !.

  • @diegofernandez8881
    @diegofernandez8881 3 ปีที่แล้ว +1

    So much thanks

  • @mohammedbaraka2591
    @mohammedbaraka2591 2 ปีที่แล้ว

    Bro, thank you very much!
    I really enjoyed this tutorial!
    I want ask you about plotting high quality plots using this library for NASA cdf data!
    I use Pyspedas to analyse MMS spacecraft data but the plots is not that good!
    Many thanks!

  • @aramisbirkhimer2506
    @aramisbirkhimer2506 ปีที่แล้ว

    Does anyone know how you would modify the animation code to track the motion of the second mass with a solid line? I think it would show the chaos of the motion very well

  • @walaceelias
    @walaceelias 2 หลายเดือนก่อน

    Can you make a video explain how to install scienceplots on jupyter notebook on this new version.

  • @naftab526
    @naftab526 2 ปีที่แล้ว

    Thanks a lot BRO, the tutorial is very helpful to get an overall idea. Can anyone plz let me know how to get a MULTI-PANEL plot using data from a FILE? Thanks in advance.

  • @CKPSchoolOfPhysics
    @CKPSchoolOfPhysics 2 ปีที่แล้ว

    How to get different view of 3D projected graphs? like side view , top view with and without animation?

  • @baghdadiabdellatif1581
    @baghdadiabdellatif1581 6 หลายเดือนก่อน

    Thank you

  • @shivpratapsingh5766
    @shivpratapsingh5766 3 ปีที่แล้ว

    Thank you Good sir, thanks a lot

  • @imamkusnendar
    @imamkusnendar ปีที่แล้ว

    Your channel Sir, absolutley worth million subscriber or even more. Many thanks.How can I contact you if any questions i wan to ask? any website or else? btw i have major in physics too. hehe

  • @revathyn5468
    @revathyn5468 หลายเดือนก่อน

    If possible pls post videos for family of Curves and for fluid mechanics pls

  • @subhabratamondal1896
    @subhabratamondal1896 ปีที่แล้ว

    Nice video.....please provide a code of how get the co ordinate values (x,y) of intersection points of two non linear curves in python. Plot visualization is also required in matplotlib. A lot of time it is needed in engineering calculation. Thank you.

  • @archniki_
    @archniki_ ปีที่แล้ว

    I'd there guide for artists musicians and so on?

  • @simawpalmer7721
    @simawpalmer7721 2 ปีที่แล้ว

    Thanks, but how to change the interpolation from linear to something like cubic or something else...

  • @user-er1lo1hj4x
    @user-er1lo1hj4x 3 ปีที่แล้ว

    Hello..I am a PhD student in physics from Iraq..I hope you can help me find codes in the Python program to study the Fe(II)particle (ising model 2D)to determine the spin crossover of the electrons and find the energy..with many thanks to you.

  • @user-mt9nj8dd8y
    @user-mt9nj8dd8y 11 หลายเดือนก่อน

    Mr. P, may I ask how to install the Science Plots:?

  • @saidteacher3331
    @saidteacher3331 9 หลายเดือนก่อน

    Which college did you go to P.Solver? any recommendations -college choice- for some one who loves Physics and coding ?

  • @lukamodric5499
    @lukamodric5499 3 ปีที่แล้ว +1

    Men, thx for doing this

  • @markkennedy9767
    @markkennedy9767 8 หลายเดือนก่อน

    Why is the method set_title() and set_label() for axes/subplots, yet title() and xlabel() etc for plots.
    You're doing the exact same thing (seemingly) yet the syntax has different words for these operations.
    It suggest to me that axes/subplots and plots are fundamentally different structures.

  • @ravikumargariradhika7706
    @ravikumargariradhika7706 ปีที่แล้ว

    how to plot y=x|x| in python

  • @frankrobert9199
    @frankrobert9199 ปีที่แล้ว

    great. when you recotd to make it size bigger, it would be better. it is a little small to look.

  • @kanuchakraborty9190
    @kanuchakraborty9190 2 ปีที่แล้ว

    Please I request you to do a tutorial on Electromagnetic wave animation in 3d in matplotlib

  • @igorbrenno1459
    @igorbrenno1459 2 ปีที่แล้ว

    I love youuuu....

  • @borisandfef
    @borisandfef 3 ปีที่แล้ว

    What's the best way to import data from a csv file and manipulate it for plotting?

    • @joseftrojan7664
      @joseftrojan7664 3 ปีที่แล้ว +1

      Try using Pandas!

    • @borisandfef
      @borisandfef 3 ปีที่แล้ว

      @@joseftrojan7664 thank you so much! Worked perfectly.

  • @noelzinn6801
    @noelzinn6801 2 ปีที่แล้ว +1

    How do I get your animation code (too fast to follow). Tks, Noel

    • @MrPSolver
      @MrPSolver  2 ปีที่แล้ว +1

      All code is in the description!

    • @noelzinn6801
      @noelzinn6801 2 ปีที่แล้ว

      @@MrPSolver Excellent. You're a remarkable find.

  • @alonalon8794
    @alonalon8794 2 ปีที่แล้ว

    7:15
    x2 and x are of different dimensions. somehow it works for you..I got en error

  • @abdusalomxudoyberdiev7606
    @abdusalomxudoyberdiev7606 2 ปีที่แล้ว

    Hello. I‘m from Uzbekistan. I‘m student.
    Can you help me by in pyton

  • @jorgeluismedina1548
    @jorgeluismedina1548 3 ปีที่แล้ว

    why does my plots look blurry in my notebook compared to yours? :(

    • @waqqiali2960
      @waqqiali2960 2 ปีที่แล้ว

      I think increasing dpi might help e.g. plt.figure(dpi=100)

  • @web3tel
    @web3tel ปีที่แล้ว

    How one install SciencePlots, please? Is it "pip install SciencePlots" ?

    • @amangoyal1680
      @amangoyal1680 ปีที่แล้ว

      You have to add channel for it

  • @adryanblack13
    @adryanblack13 2 ปีที่แล้ว

    Can you please tell me your educational background. You are quite intelligent

  • @samersalama
    @samersalama 2 ปีที่แล้ว

    Why this video in your python play list, it is not python !

  • @aliexpress.official
    @aliexpress.official 3 ปีที่แล้ว +1

    Fantastic video as always.
    The fact that python plotting doesnt have a GUI like in MATLAB is SO tiring.

    • @MrPSolver
      @MrPSolver  3 ปีที่แล้ว

      Absolutely. That being said, you kind of get used to it.

  • @sparshghimire2426
    @sparshghimire2426 3 ปีที่แล้ว

    First :)

  • @mayazhussain
    @mayazhussain หลายเดือนก่อน +4

    I came to TH-cam to waste time not to learn something useful 😢

  • @rubayetalam8759
    @rubayetalam8759 2 ปีที่แล้ว

    hey! you need to work on your playlist. Everything is a mess! thanks tho.