

In this video, we will be learning how to get started with Matplotlib.
This video is sponsored by Brilliant. Go to to sign up for free. Be one of the first 200 people to sign up with this link and get 20% off your premium subscription.
In this Python Programming video, we will be learning how to get started with Matplotlib. Matplotlib is a plotting library with a lot of functionality for visualizing our data in an easy to digest format. We will learn how to make simple line plots, customize our graphs, and the basics of working with Matplotlib. Let’s get started…
The code from this video (with added logging) can be found at:
Virtual Environment Tutorial –
Jupyter Notebook Tutorial –
Matplotlib Format Strings –
✅ Support My Channel Through Patreon:
✅ Become a Channel Member:
✅ One-Time Contribution Through PayPal:
✅ Cryptocurrency Donations:
Bitcoin Wallet – 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet – 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet – MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot
✅ Corey’s Public Amazon Wishlist
✅ Equipment I Use and Books I Recommend:
▶️ You Can Find Me On:
My Website –
My Second Channel –
Facebook –
Twitter –
Instagram –
#Python #Matplotlib
source
To those who have trouble activating the venv on Sublime Text, make sure you watch Corey's video on Sublime Text setup. Open up the command palette and install Virtual Environment, then activate it.
Bro u made my day
Thank you so much sir. Great work.
I am using jupyter notebook , my plot chart has no interactive features , its not coming as a popup chart.
Thank you Corey Schafer
Felt like the Flask series didn't fully explain everything enough, to broaden my Python knowledge. After all, I started learning the Falsk series, not because I wanted to have the skills to make a web application, but expecting that I can review and apply the basic python skills that I learned from the beginner tutorial playlist.
So I started on a new tutorial on mathplotlib, which is a popular module in python for plotting graphs, widely used in the data science field. I thought this would be more practical, since I was also considering the data science field as my possible job area in the future. It was mainly because data science related programmers earn the highest salary among programmers worldwide.
I installed matplotlib in a virtual environment using WSL, activated it, and opened up the sublime text,followed Corey on what he typed as in the video. However, the Sublime text gave Modulenotfounderror in the console. By right, I should have seen a graph popping up in a separate window, like Corey in the video.
On the surface, I could not understand what went wrong, since I completed all the steps that I thought was necessary to import a third-party module. It was such a huge stress to crash into such errors where I have no idea how to fix. It was serious because there were so many possible reasons why I crashed, since I used WSL, using python 3 in not the latest version(3.6), as well as other modules such as pip, pipenv and so on.
First, I checked to which modules, were these Modulenotfounderror happenning. Just to 3rd party packages? or to all libraries including the standard library. I commanded pip install pygame(another 3rd party package), to make sure that the error was not only appearing to matplotlib, but to all third party packages. Then I imported the SYS module, and OS modules, which are a part of the standard library. They worked just fine, which meant that I am having the errors only with the 3rd party packages.
Next, I wanted to check whether I had enough knowledge on importing modules. So I went back and watched the tutorials on VENV, PIP, and PIPENV. Spent about 40 minutes there. Then thought, 'To import a module, the module has to be in one of the directories that appear in the sys.path list. Should I add directory to the matplotlib module in sys.path manually?' However, this wasn't the solution since I did not know where my matplotlib package was installed, and couldn't even find its file location in the file explorer, when I typed 'matplotlib'. It simply did not appear. If it is a problem that I can solve, I definitely want to solve it, so I went on to think what other things could be the problem.
Then, I started to doubt that activating the virtual environment in ubuntu didn't really have actual effect, when I clicked 'Build' in Sublime text 3.
So I was wondering, 'Is there a option in Sublime text 3 where I can turn on and off particular virtual environment?'.
I also thought, 'Maybe its a version problem!. I might have set my default python to 2, and installed the matplotlib package to python3, or vice versa!'. However, this was not it, since I have downloaded the matplotlib on both pip and pip3, and found out that the module didn't work.
Then I saw this statement. 'Default something inacessible, so site package blah blah'
At last, I tried pip list and pip3 list in my command prompt, not in the bash mode, or in ubuntu(which can be summarized as Windows Subsystem for Linux, WSL). Surprisingly, I could not see the long list of pip list that I saw, when I typed the same command in WSL. A lot of the packages that I installed in WSL were not found in cmd. When I installed matplotlib package in cmd using pip install, I finally didn't get the Modulenotfounderror in the sublime text console. To everyone who's having a hard time following Corey's tutorials on Windows, let's not give up, and do our best!!!
one of the best tutorials, easy, well explained and just a breath of fresh air.
Course didn't begin with "hello friends." We're off to a good start!
Thanks a lot!
Hi! Everyone. Before you watch this tutorial understand the structure of a graph – https://matplotlib.org/3.1.1/_images/anatomy.png
Hey Corey love the patience you have towards explaining, how to connect to windows please provide a link if you already have thank you.
Please, tutorial on web scrape, a variable that changes every 1 minute…need chart to update…All I see is old data imports from spreadsheet
what theme are you using?
Thank you so much for this video! I learned a lot.
excellent, will send a one time payment.
You are awesome. That is an incredible tutorial.
Thank you Corey, very good tutorial. Run fines on Jupyterlab…
%matplotlib qt -> show plot in seperate window, like your tutorial
#%matplotlib inline -> show embedded plot
If anyone is doing it on Jupyter notebook and having problem of not having the options below graph then just do one thing, before importing matplotlib add this %matplotlib notebook and you'll have all the options.
plt.style.use doesn't work at all..does anybody have any idea what can i do?
OSError: [Errno 30] Read-only file system: 'plot.png'
I'm getting this error in mac.
And I seem to be the only one getting it in comment section.
Googling didn't help
Fantastic material! Thank you, Corey!
Thank you for this tutorial! It is easy to understand and gives a good overview 🙂
Can I use it to make the snake game?
Excellent video Corey!
You are legend, the way you explain the concepts is unbelievable, even paid courses instructor will fail against you.
Nice tutorial, thanks a lot.