Matplotlib Python Tutorial Part 1: Basics and your first Graph!

preview_player
Показать описание

Introduction of downloading matplotlib, the basic functions, and charting your first graph!

To start, you will obviously need Matplotlib, as well as Python. This tutorial series uses Python 2.7. Almost everything can be ported to Python 3+ so long as you know the basic syntax differences.

Matplotlib is one of the most popular modules for creating graphs and charts in Python. It is simple to use, yet has a wide range of abilities for data visualization.

Рекомендации по теме
Комментарии
Автор

I love your informal 'let's just chat and show stuff' approach. It keeps me engaged. Thank you, kind sir 🖖🏽🎊

ozzyfromspace
Автор

Hey there, actually, I have indeed made this improvement. There was a few non-1080p videos recorded when I first made this account, and this is one of them. I assure you, the later videos are in beautiful HD, if you are willing to muddle through the ugly 480p beginning ones!

sentdex
Автор

Absolutely perfect tutorial! Hats off to you, sir :)

tejasviclaw
Автор

finally was able to get everything downloaded. super frustrating, but I'm excited to be up and running

takebyforce
Автор

Download 7-zip, and fully extract the tarball, its going to be 2 extractions. From there, install using python setup.py. I have done it on film a few times on film. One of them was for the Django tutorial series. Check that out if you still get stumped. Best wishes!

sentdex
Автор

I use the one that comes with the basic installation. If you installed python, you have it.
Just type in "IDLE" to your start bar, and there it is.
To get to a blank script, just go file => new. When saving, be sure to save as a .py. By default, it wont save as .py initially.

sentdex
Автор

@sentdex Happy new year and you become professional Youtuber day by day :v

leloc
Автор

In that case, download setup tools!

Google setuptools python 2.7, should be the first link to download it.

I am slightly confused, however. Did you ever successfully install matplotlib? Like, can you open up the python command line, and do:

import matplotlib

without errors? You should be able to plot this first graph purely with just matplotlib and that's it.

sentdex
Автор

thank you so much!!! You're a lifesaver.

musicrules
Автор

There's definitely a way to make a tool like that, but is definitely out of my realm of expertise. You should probably start your search with python's Tkinter if it must be a new addition to the GUI.

sentdex
Автор

Sounds like you don't have numpy! Definitely a must-have for charting and for all things math and python.

Go to google, type in numpy download and download/install it. I believe numpy has a pretty easy installer, like matplotlib did. Let me know if you have any trouble.

sentdex
Автор

Either you don't have it, or you have an incorrect bit version, like 64bit python with 32bit matplotlib.

sentdex
Автор

Could you please elaborate as to what is not working?

sentdex
Автор

For some reason, I never saw this comment, sorry. As you get further along, you can learn more about sub plots, and share axis commands. Most of the time, this is in the form of defining another subplot, then sharing the x axis.

sentdex
Автор

+Piff color, for some reason I cannot respond to you, but I have not heard of mayavi. I'll look into it.

sentdex
Автор

Thanks Mr Sentdex. I gave up on trying to get MatPlotLib running on Idle and loaded Canopy. It apparently has MatPlotLib already loaded and whatever else is needed as Canopy successfully runs your simple three line (two line?) program. I'm not sold on Canopy as it's an extra layer. I prefer simpler, like running Idle, but Canopy is working so far. Thanks again!

MrBakerwang
Автор

Hi!
do you know if there is a way to set bounds on the grid in terms of both x axis (top and bottom) and y axis(left and right)?

lakenyaw
Автор

Hmm, it is possible, but I think doing it that way would be overly complex, compared to using a much easier math equation to disallow an outlier based on parameters.

sentdex
Автор

I'm having so much trouble getting matplotlib installed and working. There's so many odd extension packages and names that get thrown around without explanation. I'm on Mac, does that make it harder?

christianlewis
Автор

I can't download six! It previously worked on my hp compaq but i now have a hp pavilion windows 8 and six isn't downloading. I'm using python 3.3 32 bits, any help?

itstechiepodcast
join shbcf.ru