Python Tutorial for Beginners #13 - Plotting Graphs in Python (matplotlib)

Поділитися
Вставка
  • Опубліковано 20 лип 2024
  • Learn to plot graphs in Python in this tutorial! We cover matplotlib and show you how to get an awesome looking plot.
    As part of our upcoming 'Maths and Physics in Python' series, we will be exploring a variety of graphs in more depth so subscribe and hit the bell button so you don't miss out on a tutorial!
    🔔NEW videos, tutorials and projects EVERY week so subscribe and hit the bell button so you don't miss an update!
    ▶️Watch our Python Projects tutorials playlist here:
    • Python Tutorial for Be...
    ▶️Watch our full Python tutorial course here:
    • Python Tutorial for Be...
    👊🖐✌️Why not teach yourself how to code Rock, Paper, Scissors in Python!
    Video here:
    • Python Tutorial for Be...
    🔗 Social Media Links 🔗
    ▶️UA-cam: / @codeofthefuture
    📸 Instagram: / codeofthefuture
    📱TikTok: / codeofthefuture
    📘Facebook: / codeofthefuture
    🦜Twitter: / code_ot_future
    📝LinkedIn: / code-of-the-future
    🌎Website - Features Articles: www.codeofthefuture.com/articles
    📂GitHub: github.com/code-of-the-future
    💸 Donations 💸
    ⬇️Any donations are gratefully received & all donations go straight back into this channel!⬇️
    ko-fi.com/codeofthefuture
    ⭐️ Hashtags ⭐️
    #CodeOfTheFuture #WomenWhoCode #Python #Coding #Programming #Tutorials
    Subscribers - 312

КОМЕНТАРІ • 38

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

    Very well explained and straight to the point. Love it!

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

    This is really cool and informative. Thank you a lot ellie for sharing this with us !

  • @Martyna-rw3ut
    @Martyna-rw3ut 3 роки тому +4

    That was very helpful, thx for all

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

    Very helpful thank you!

  • @jassicalawrence818
    @jassicalawrence818 3 місяці тому

    useful I am going to try this . Simple and effective for my PhD graphs

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

    This is very useful!

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

    exactly what I was looking for! simple and basic, yet exotic... you seent them markers?!

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

    you are the best

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

    I’ve tried installing matplotlib as you commented someone else do but I’m still getting the error “no module named matplotlib”. Any suggestions? On a Mac btw

  • @Tech-du2bg
    @Tech-du2bg 2 роки тому

    x and y must have same first dimension, but have shapes (30, 30) and (1,) can you help me how I can solve this problem?

  • @SurendraSingh-bd5wc
    @SurendraSingh-bd5wc 5 місяців тому

    Could anyone tell me how to import the code into my computer

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

    pycharm is telling me the module 'matplotlib' isn't found.. someone please help!

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

    but i am getting error that matplotlib.pyplot has no "plot" attribute why?

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

      It might be an error with the installation. Have you installed matplotlib correctly? :)

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

    ¿Disculpame como hago para cambiar la dimensión de la venta del plot?

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

      I think you're asking how to change the dimension of the scale of the plot. But just incase you mean something else, here's a few things you can do:
      Changing axes limits:
      plt.ylim(a, b)
      plt.xlim(c, d)
      where a and b are your upper and lower limits for the y axes and c and d are the upper and lower limits of the x axes. You assign your own a, b, c and d.
      If you want to change the size of the figures drawn:
      Before asking python to plot (plt.plot(x,y)), write this,
      plt.figure(figsize=(6,6))
      Here you can change 6,6 to any number you want but make sure it's not too small or too large because that will mean your plot will be!
      If neither of those responses help you, comment back and I'll try understand what it is you're wanting! 😊

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

      @@CodeoftheFuture Muchas gracias la verdad me sirvió mucho lo que me dijiste

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

      @@yenref4 I'm glad it was helpful! I'm not too sure what you're asking but if you rephrase it differently, I may be able to help! 😊

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

    Do we actually need the R Project anymore, if Python is so powerful?

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

      Good question! R is built as a statistical language and so suits better for statistical learning! Personally, I prefer python but all statistical modules at university are taught using R!

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

      @@CodeoftheFuture Yes, that is also my level of knowledge, but since I've been dealing with Python, I've got the feeling that there is a package for Python for every problem, so that you actually don't need an R anymore. Ty.

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

    16:58 Why is the code still running and hasn't been fully executed?

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

      Because the plot is still showing :) your python code will only stop running once you have crossed off the plot!

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

      @@CodeoftheFuture Understood, ty!

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

    somehow I am getting an error "ModuleNotFoundError: No module named 'matplotlib'"

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

      I think that's because you have to install it! There's a link below that might help! What computer are you using? Windows, mac...? :)
      matplotlib.org/3.3.3/users/installing.html

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

      @@CodeoftheFuture I am using mac

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

      ​@@deepikasinghal3530 Okay perfect, you can actually install it for the given project you're working on! Go to where it says Pycharm at the top left of your screen, click preferences, click project, then python interpreter and there should be a little + sign. Click that and search for matplotlib, then you can download it! If you're still stuck, I explain how to download a module in this video (around 3:37):
      ua-cam.com/video/JdWeR9bHqTc/v-deo.html

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

      @@CodeoftheFuture It worked!!! thank you so much :)

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

      @@deepikasinghal3530 no problem at all! Happy to help☺️

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

    here is the name of the video that solves your problem guys: FIXED: "ModuleNotFoundError: No module named 'numpy'" | How To Install NumPy In PyCharm

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

    This is really cool and informative. Thank you a lot ellie for sharing this with us !