Python Tutorial for Beginners #13 - Plotting Graphs in Python (matplotlib)
HTML-код
- Опубликовано: 15 июл 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 🔗
▶️RUclips: / @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
This is really cool and informative. Thank you a lot ellie for sharing this with us !
Very well explained and straight to the point. Love it!
Very helpful thank you!
useful I am going to try this . Simple and effective for my PhD graphs
you are the best
That was very helpful, thx for all
Thank you!
This is very useful!
Thank you! I’m very glad!
exactly what I was looking for! simple and basic, yet exotic... you seent them markers?!
Thank you so much!! :)
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
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?
Could anyone tell me how to import the code into my computer
pycharm is telling me the module 'matplotlib' isn't found.. someone please help!
nvm I fixed it :)
¿Disculpame como hago para cambiar la dimensión de la venta del plot?
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! 😊
@@CodeoftheFuture Muchas gracias la verdad me sirvió mucho lo que me dijiste
@@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! 😊
Do we actually need the R Project anymore, if Python is so powerful?
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!
@@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.
but i am getting error that matplotlib.pyplot has no "plot" attribute why?
It might be an error with the installation. Have you installed matplotlib correctly? :)
16:58 Why is the code still running and hasn't been fully executed?
Because the plot is still showing :) your python code will only stop running once you have crossed off the plot!
@@CodeoftheFuture Understood, ty!
somehow I am getting an error "ModuleNotFoundError: No module named 'matplotlib'"
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
@@CodeoftheFuture I am using mac
@@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):
ruclips.net/video/JdWeR9bHqTc/видео.html
@@CodeoftheFuture It worked!!! thank you so much :)
@@deepikasinghal3530 no problem at all! Happy to help☺️
here is the name of the video that solves your problem guys: FIXED: "ModuleNotFoundError: No module named 'numpy'" | How To Install NumPy In PyCharm
This is really cool and informative. Thank you a lot ellie for sharing this with us !
Thank you very much, Manoj!! :)