TABLE OF CONTENTS 00:00 Intro 00:32 Importing 02:38 Simple Plotting 04:52 Multiple Plots 06:08 Using Figure Objects 12:32 Subplots 15:03 Appearance Options 21:28 Saving Plots 22:09 Working with Pandas Dataframe 29:01 TeX Markup (Math Symbols) 36:41 Histograms 40:57 Bar Charts 48:19 Pie Charts 53:50 Timeseries 59:31 Tables 1:08:21 Scatterplots 1:12:59 3D Surfaces 1:21:38 Matplotlib Finance 1:26:23 Heatmaps Probability in One Video : kzbin.info/www/bejne/qXbXlmeejaqagJo Statistics in One Video : kzbin.info/www/bejne/qpTYpHyFm66Sfa8 NumPy in One Video : kzbin.info/www/bejne/boqTooR7nZyXgMk Pandas in One Video : kzbin.info/www/bejne/hpTZpIKXnt2Inpo
@thunderbirdizations3 жыл бұрын
1:33:45 Stayed til the end. Have an enormous project with a crazy learning curve ahead. I don’t plan on using matplotlib but I wanted to learn it before PlotLy to get a second perspective.
@m.aurelien28724 жыл бұрын
I was just finishing an implementation of a deep learning paper and needed to plot some stuff, great timing!
@derekbanas4 жыл бұрын
That's great! I'm happy I could help :)
@punkbuster20048 ай бұрын
WOW , that was a really through class!!! I know that you din't dive too deep on every module, but it actually is not neeeded . anyone wanting to learn Python will find he's way, all we need is this headstart!!
@TheVerbalAxiom3 жыл бұрын
I just realized I needed to learn matplotlib in DEPTH and of course it WOULD be Derek to help me, gotta love this freakin genius.
@digigoliath4 жыл бұрын
OMG!! Everything I need in 1 video. Derek, you are my superhero!!! SMASHING the LIKE Button!!
@derekbanas4 жыл бұрын
Thank you very much :) I appreciate that!!!
@elijahkalii52903 жыл бұрын
You are the only guy I have found who can really teach me data analysis. You are really good at this Derek. Thank you. Elijah Kalii. Nairobi, Kenya
@arturowatson3 жыл бұрын
The college professor you wished you had! To say Derek knows his stuff is just a bit understated. Video moves rapidly covering many visualization possibilities using Jupyter notebook. One of the hurdles I've had with Matplotlib is that there are actually too many possibilities with disjointed specifics. The pace, logical progression and scope of this video is perfect, leaving the viewer with functioning code examples to run, modify and explore on their own. Bravo!
@derekbanas3 жыл бұрын
Thank you for the nice compliment :) I do this stuff for a living so I’m happy to hear that I was able to make it understandable.
@vedachintha2 жыл бұрын
This is a fantastic tutorial. Even though I have a lot of experience in plotting using Excel and PowerBI, for reasons unknown, I've always felt intimidated by the idea of plotting using python. From your video, I've gained a lot of knowledge and confidence, thank you so much for your effort. Also, many thanks for the ipynb file, much appreciated. Next stop - Seaborn Tutorial :-)
@derekbanas2 жыл бұрын
Thanks for taking the time to tell me it helped :) Enjoy Seaborn
@CKPSchoolOfPhysics2 жыл бұрын
Really powerful introduction of Matplotlib from basic to really advanced level. This has helped me tremendously in my ML plotting.
@GabrieleIuzzolino10 ай бұрын
Ty, the way you talk is really easy to understand for non-native English speakers like me
@MikkoHaavisto13 жыл бұрын
Thank you and keep making these! I've watched hundreds of Python videos here in KZbin, but yours might be the best.
@andreapaps2 жыл бұрын
This is great, the info comes at you so fast... Basically you see what is possible then when you need to actually use it you come back and pause the video and copy the code :D
@liapeterson10512 жыл бұрын
By 12 minutes in, my mind was absolutely blown. Thank you for making these!
@derekbanas2 жыл бұрын
Thank you :) I'm very happy that I could help
@davidcrossey4 жыл бұрын
This series has come up at a fantastic time in the Data Science / Machine Learning space. As a software engineer myself with weaker background in mathematics, trying to prepare for the future in this field has always been daunting. These video tutorials, along with the statistics series are extremely valuable to making this area more accessible & fun to learn - thank you @Derek Banas !
@derekbanas4 жыл бұрын
Thank you :) I’m doing my best to create a step-by-step course while also trying to present everything in new ways. I’ve been using data science for work for quite some time so I have my core toolset. I will however try to cover everything to the best of my ability. For example I mainly use PyTorch, but I’ll cover Tensorflow as well.
@GloomyElder4 жыл бұрын
I just watched your Plotly and matplotlib tutorials, they are awesome, I' heading to watch the seaborn , numpy and and the other cool videos you have! Keep the great work, greetings from Mexico
@derekbanas4 жыл бұрын
Thank you very much :) I love Mexico!
@sshashi674 ай бұрын
Great video for starting off various charts...then do deep dive into specifics as needed using documentation. (Watched to the end!)
@markkennedy9767 Жыл бұрын
At 23:50, why do we need to convert the pandas dataframe to a numpy array. Isn't pandas based on numpy. Also, many stackexchange posts suggest that .values (is this an attribute?) is not recommended to do this. They suggest using the function Dataframe to numpy() instead. At 38:10, why are you choosing stacked=True if there is only one data set for the histogram. Isn't this redundant (and kinda confusing)? At 48:10, surely you need to change the tick labels back form the index to the school types again using xticks(ticks, labels) etc?
@ericzheng48152 жыл бұрын
This video is invaluable. It is so well-prepared and every plot is explained very clearly.
@derekbanas2 жыл бұрын
Thank you for the nice compliment :) I'm happy you found it useful!
@i-eto-projdjot2 жыл бұрын
Thanks for nice tutorial! Some shorthand for rounding in Tabels section: df.iloc[:, 1:6] = round(df.iloc[:, 1:6], 2) This line of code would round all values in all price columns
@debjyotiarr4 жыл бұрын
Commenting after watching the whole video and also following along on a Jupyter notebook of my own. Sincere gratitude to you!
@derekbanas4 жыл бұрын
Thank you for taking the time to say I helped :) I greatly appreciate it
@MohammadYousofi-ho9bh8 ай бұрын
Your teaching method is just great! I love the way you are teaching Sir. I recently purchased a Data Science course in Udemy from Jose Portilla, but his teaching method is not interesting to me at least. And I wanted to say that I rarely comment on videos on KZbin, and those are the ones I liked a lot like this video! Bravo!!!
@derekbanas8 ай бұрын
Thank you very much :) I'm glad that I could help.
@gavyn32584 жыл бұрын
Watched the whole video and followed along on Jupyter. Excellent content that deserves a like and subscribe
@derekbanas4 жыл бұрын
Thank you very much :) I'm very happy that you enjoyed it
@maziarghorbani3 жыл бұрын
I watched the whole video but in two goes. As usual, very informative and professional. Thank you 🙂
@Naeem2460 Жыл бұрын
I just found your channel, and it has everything that i need, Thank you very much
@derekbanas Жыл бұрын
Thank you :) I’m happy I could help
@RahulKumar-fc8cf Жыл бұрын
Great Content and very concise one. Really enjoyed learning plotting with Matplotlib. Keep up the good work.
@stacysanders7735 Жыл бұрын
Thank you for a great video. I did watch until the end and appreciate the great pacing.
@odraudenoel3 жыл бұрын
Thanks so much for your tutorials, I am a big fan! Always watch all the way to the end!
@eythoreinarsson62604 жыл бұрын
Watched the whole video, although I skipped some details since I am quite familiar with matplotlib. I liked slower pace of the video, it made it easy to casually watch the video without my full attention. I am looking forward to seaborn, which i have not used it yet, so you will have my full attention. Thank you very much for your videos, the amount and breadth of topics you are able to cover is amazing.
@derekbanas4 жыл бұрын
Thank you for the input. Yes I just slightly slowed the video to see if anyone noticed. I appreciate both that you watched the video and that you said you preferred the slower speed I'll keep doing it. Yes Seaborn is next. It should be up in less than 6 days.
@umairsalim9442 Жыл бұрын
Just completed the whole video, above everything else just loved the way you say 'anndddddd' 😅
@gabrielgirodo3 жыл бұрын
Tks for the video! You made it very easy and the cheat sheet will come in handy. Now I will move to the seaborn tutorial. Have a great day!
@derekbanas3 жыл бұрын
I'm happy I could help :)
@olejir2 жыл бұрын
It's such an amazing course, thank u a lot. I'm so glad that I've found ur channel!
@derekbanas2 жыл бұрын
Thank you :) I'm very happy you found it useful!
@manavt2000 Жыл бұрын
Thank you very much for this amazing tutorial! Love from Germany
@derekbanas Жыл бұрын
I'm very happy you found it useful :)
@markkennedy9767 Жыл бұрын
The syntax for subplotting is incredibly confusing. There are various functions e.g. subplot(), subplots(), add_subplot() or the axes() functions, all used in a variety of ways e.g. some as part of the module plt in plt.subplots() or plt.subplot() here and some as a method acting on the figure e.g. fig.add_subplots. Then there's the various and confusing indices for the arguments. For example, around 5:15, couldn't you first just assign plt.subplot() with its arguments to a variable e.g. ax1 and then on the next line have ax1.plot() with it's arguments. The reason I say this is that I can't understand how plt.plot() with its arguments knows how to work on the specific axis plt.subplot() etc on the line above it. I suspect fig.add_subplots is the best way to create subplots, but every video seems to do it differently. Surely at 11:50, the arguments for positioning the text for axes2 are based not on the centre of the figure being (0,0) as you say, but on the origin of axis 2 being (0,0). If you see where the text ends up, this is clear (around (0,40) relative to the axis 2 origin).
@sameerreddy75146 ай бұрын
Amazing tutorial. was easy to follow. thanks Derek.
@chriscoyne28813 жыл бұрын
stayed until the end and am now going to watch all of your other videos
@derekbanas3 жыл бұрын
Thank you very much :) There are a lot of them!
@mgr12824 жыл бұрын
Great series: numpy, pandas, matplotlib. what's next? tensorflow? pytorch? scikitlearn?
@derekbanas4 жыл бұрын
Thank you 😁 Yes I'll cover all of the above and more. Seaborn is next
@digigoliath4 жыл бұрын
@@derekbanas Wow!!
@markkennedy9767 Жыл бұрын
Thank you for this. At 12:20, is there any good reason why the add_axes() method takes a list as argument, yet the text() method takes a tuple. It seems totally arbitrary since the arguments are both related to location etc.
@olevam13 жыл бұрын
Thanks to this video I finally understood how to modify axes properly (I need to create them in a figure first!) week of figuring it out paid off!
@derekbanas3 жыл бұрын
I'm happy I could help :)
@olevam13 жыл бұрын
@@derekbanas One questions, I have struggled to save the file, as it does not show the axes (and I noticed it does not show it in your video either) any thoughts on how to get the axes to show on the saved file?
@praleen_4 жыл бұрын
My first line of code worked at first try! \o/
@MarieAmeliaFreyaAster3 жыл бұрын
Never trust computers
@dinoscheidt3 жыл бұрын
Super useful. Incredible preparation and delivery. Love from Berlin ❤️
@derekbanas3 жыл бұрын
Thank you for the nice compliment :)
@gerrywilson20354 жыл бұрын
God will bless you for giving free education... Keep it up... ✌️♥️
@gerrywilson20354 жыл бұрын
If possible try to cover keras and tensorflow
@derekbanas4 жыл бұрын
Thank you for the nice message 😁 I tend to use PyTorch most often but I will definitely cover tensorflow and keras as well
@gerrywilson20354 жыл бұрын
@@derekbanas Thanks😊
@younesmakhchan20103 жыл бұрын
dude , 3D Surfaces are amazing
@pavanim62584 жыл бұрын
Excellent content and very useful stuff..all in one video..thx a lot for sharing Derek
@derekbanas4 жыл бұрын
Thank you very much :) Happy I could help
@yashjadhav39743 жыл бұрын
love your content man.......much support to you!!!
@derekbanas3 жыл бұрын
Thank you very much :)
@kennethstephani692 Жыл бұрын
Great video, Derek!!
@alwin59952 жыл бұрын
completed the whole thing amazing
@gesuchter4 жыл бұрын
I am very ready for this one, thank you!
@derekbanas4 жыл бұрын
Thank you for following my series :)
@mahmoudabdelaziz79942 жыл бұрын
8:44 will anyone please tell me how you wrote the small 2 like that
@maxqin293 жыл бұрын
Hi Derek, good job. How did you input x^2 in your Jupyter notebook at 8:43?
@daviaires22192 жыл бұрын
You mean how to input the "²"? ctrl + alt + 2 (not the 2 on the numpad, the other one)
@abhin.v49812 жыл бұрын
That was an excellent tutorial. I did not understand why you used list comprehension at 41:18 instead of directly passing t_type as an argument?
@Pattypatpat712211 ай бұрын
Great content! I learnt a lot
@ebbandari2 жыл бұрын
Fantastic tutorial. Thank you.
@deondoure10752 жыл бұрын
Good video thanks. I will watch it again.
@derekbanas2 жыл бұрын
Thank you :)
@jacquesfrancois4275 Жыл бұрын
5:15, Hi what does 1,2,1 refer to exactly in this instance?
@JasonOngVlog2 жыл бұрын
Can anyone help me in adding labels for the scatterplot sample? I'm trying but it keeps getting errors.. the scatterplot is in 1:12:00
@ogadit4 жыл бұрын
WAITING FOR THIS FOR SOO LONG
@derekbanas4 жыл бұрын
I hope you find it useful :)
@m.h.71214 жыл бұрын
top-notch tutorial as always. Thank you so much, man. You are my motivation that keeps me productive every day. BTW, I just noticed that your typing speed is getting slow. But I still like your content tho.
@derekbanas4 жыл бұрын
Thank you very much :) I have been messing with the tutorial speed to see if people like videos that are slightly slower.
@m.h.71214 жыл бұрын
@@derekbanas Alright. I can see some data science projects over there...(I just travelled into the future).LOL
@josefkurk14924 жыл бұрын
fajtastic review!! super easy to undestend:)
@derekbanas4 жыл бұрын
Thank you very much 😁
@TheLegalLens1 Жыл бұрын
At 7:20 , I can't get this code to run: `fig1 = plt.figure(figsize(5,4),dpi =100)` Error: NameError Traceback (most recent call last) Input In [7], in () ----> 1 fig1 = plt.figure(figsize(5,4),dpi =100) Any idea what I have wrong here?
@TheLegalLens1 Жыл бұрын
Chatgpt solved it: fig1 = plt.figure(figsize=(5,4),dpi=100) Explanation below -> 'The issue with your code is that you have specified the figsize argument incorrectly. The figsize argument expects a tuple of width and height values, but in your code, you have specified it as two separate values. To fix this issue, you can modify your code as follows: import matplotlib.pyplot as plt fig1 = plt.figure(figsize=(5,4), dpi=100) axes_1 = fig1.add_axes([0.1, 0.1, 0.9, 0.9]) axes_1.set_xlabel("x-axis label") plt.show() Thanks chatpgt
@TheLegalLens1 Жыл бұрын
Also just saw you correct the error @ 9:30 lol.....
@joaovaz34734 жыл бұрын
Great video, as always! Btw, first.
@derekbanas4 жыл бұрын
Thank you very much :)
@JackQuark2 жыл бұрын
Great tutorial, thanks.
@burner9183 жыл бұрын
Loved this video. Thank you so much.
@shreyasmd213 жыл бұрын
thank you for making this video, it really helped me a lot!
@derekbanas3 жыл бұрын
I'm very happy that I could help :)
@bhavinmoriya92163 жыл бұрын
Thank you very much for the wonderful vide0 :)
@derekbanas3 жыл бұрын
Thank you :) I'm very happy you enjoyed it
@jamesjohnathan44243 жыл бұрын
Thanks for the valuable piece of information. Appreciate that :)
@derekbanas3 жыл бұрын
I'm happy to be of help :)
@jamesjohnathan44243 жыл бұрын
@@derekbanas big thanks sir
@igniculus_4 жыл бұрын
Wow, thank you so much for this!
@derekbanas4 жыл бұрын
Thank you for following my videos :)
@carlypetracco11074 жыл бұрын
Thank you, this was great!
@derekbanas4 жыл бұрын
Thank you for taking the time to say it helped :)
@cvryn73 жыл бұрын
Just finished it. thanks
@derekbanas3 жыл бұрын
Happy I could help :)
@garvsadh9983 Жыл бұрын
in the timeseries section it shows the error that ValueError: x and y must have same first dimension, but have shapes (64,) and (251,) even after copying your code it does not seem to work What do you think might be the issue here im kinda stuck thanks
@upgraduate3 жыл бұрын
😊 very nice tutorial
@derekbanas3 жыл бұрын
Thank you very much :)
@qtrix064 жыл бұрын
Make a video on OpenCV please!
@sankalpchenna33554 жыл бұрын
Hey Derek you are amazing I have learnt a lot from your machine series if possible can make a video on sikit learn And machine learning algorithms in python with real-time examples that would be great!! Again, thanks a lot for your effort it really makes a difference load of love from india..
@derekbanas4 жыл бұрын
Thank you very much :) Yes I plan to do both and a whole lot more. Seaborn is next
@vanshshah64183 жыл бұрын
plt.scatter() plt.plot() plt.title() plt.xlabel() plt.ylabel() plt.show() plt is a module and all these scatter,plot,show are functions than how are they connected like where is the information from one function being stored so that another function can use it?? please answer me
@vishwad93724 жыл бұрын
Hi derek, I learned alot from you. (Thank you ) **1000
@derekbanas4 жыл бұрын
Thank you for taking the time to tell me that :) I appreciate it
@Emma-mu7kj3 жыл бұрын
Thanks again for this great course! Could you show me your solution on Subplout IN[12] with a for loop?
@bennguyen13134 жыл бұрын
Why is pandas, sometimes, but not always used in conjunction with matplotlib? Any suggestions on how to read/parse/plot a string from the (py)serial port, such that no data is dropped? The transmitter sends lines like "1.23, 3.3, 87.1 " every 500ms for approximately 2 minutes.. yet in the code below, the update to the plot seems to take too much time, because the data starts to get dropped (or gets backed up into a queue?), and does not get plotted nor csv saved . Is there more efficient way of plotting (animation) or using threads import serial import time import csv import threading import numpy as np import matplotlib matplotlib.use("tkAgg") import matplotlib.pyplot as plt #TODO : Use threads for Plot and Serial.. like ComPlotter or felipengeletrica /PyDatalogger ser = serial.Serial('/dev/ttyACM0') ser.flushInput() plot_window = 20 y_var = np.array(np.zeros([plot_window])) plt.ion() fig, ax = plt.subplots() line, = ax.plot(y_var) while True: try: ser_bytes = ser.readline() try: decoded_bytes = float(ser_bytes[0:len(ser_bytes)-2].decode("utf-8")) print(decoded_bytes) except: continue with open("test_data.csv","a") as f: writer = csv.writer(f,delimiter=",") writer.writerow([time.time(),decoded_bytes]) y_var = np.append(y_var,decoded_bytes) y_var = y_var[1:plot_window+1] line.set_ydata(y_var) ax.relim() ax.autoscale_view() fig.canvas.draw() fig.canvas.flush_events() except: print("Keyboard Interrupt") break ################################## ################################## ################################## def Main(): ser = None # serial.Serial(3, 11520) t1 = threading.Thread(target = Task1, args=[ser]) t2 = threading.Thread(target = Task2, args=[ser]) Report("Starting Thread 1") t1.start() time.sleep(3) Report("Starting Thread 2") t2.start() if __name__ == '__main__': Main() ################################## ################################## ################################## import serial import wx import numpy import matplotlib matplotlib.use('WXAgg') from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg from matplotlib.figure import Figure import matplotlib.pyplot as plt class DataLoggerWindow(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, -1, "ComPlotter", (100,100), (640,480)) self.SetBackgroundColour('#ece9d8') # Flag variables self.isLogging = False # Create data buffers self.N = 100 self.n = range(self.N) self.M = 3 self.x = [] for m in range(self.M): self.x.append(0 * numpy.ones(self.N, numpy.int)) # Create plot area and axes self.fig = Figure(facecolor='#ece9d8') self.canvas = FigureCanvasWxAgg(self, -1, self.fig) self.canvas.SetPosition((0,0)) self.canvas.SetSize((640,320)) self.ax = self.fig.add_axes([0.08,0.1,0.86,0.8]) self.ax.autoscale(False) self.ax.set_xlim(0, 99) self.ax.set_ylim(-100, 1100) for m in range(self.M): self.ax.plot(self.n,self.x[m]) # Create text box for event logging self.log_text = wx.TextCtrl( self, -1, pos=(140,320), size=(465,100), style=wx.TE_MULTILINE) self.log_text.SetFont( wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.NORMAL, False)) # Create timer to read incoming data and scroll plot self.timer = wx.Timer(self) self.Bind(wx.EVT_TIMER, self.GetSample, self.timer) # Create start/stop button self.start_stop_button = wx.Button( self, label="Start", pos=(25,320), size=(100,100)) self.start_stop_button.SetFont( wx.Font(14, wx.DEFAULT, wx.NORMAL, wx.NORMAL, False)) self.start_stop_button.Bind( wx.EVT_BUTTON, self.onStartStopButton) def GetSample(self, event=None): # Get a line of text from the serial port sample_string = self.ser.readline() # Add the line to the log text box self.log_text.AppendText(sample_string) # If the line is the right length, parse it if len(sample_string) == 15: sample_string = sample_string[0:-1] sample_values = sample_string.split() for m in range(self.M): # get one value from sample value = int(sample_values[m]) self.x[m][0:99] = self.x[m][1:] self.x[m][99] = value # Update plot self.ax.cla() self.ax.autoscale(False) self.ax.set_xlim(0, self.N - 1) self.ax.set_ylim(-100, 1100) for m in range(self.M): self.ax.plot(self.n, self.x[m]) self.canvas.draw() def onStartStopButton(self, event): if not self.isLogging: self.isLogging = True self.ser = serial.Serial() self.ser.baudrate = 38400 self.ser.timeout=0.25 # Try serial ports one by one starting # with COM30 and working downwards for m in range(29, 0, -1): self.ser.port = m try: # Try this port number self.ser.open() # We only get to here if port opened self.log_text.AppendText( 'Opened COM' + str(m+1) + '... ') break except: # We end up here if this port number # failed to open pass if self.ser.isOpen(): # We successfully opened a port, so start # a timer to read incoming data self.timer.Start(100) self.start_stop_button.SetLabel("Stop") else: self.timer.Stop() self.ser.close() self.isLogging = False self.start_stop_button.SetLabel("Start") if __name__ == '__main__': app = wx.PySimpleApp() window = DataLoggerWindow() window.Show() app.MainLoop()
@4getme2getme10 ай бұрын
sir, How do you wrote a supersript x**2 casually in jupyter notebbok in code mode?! :O
@cl324 жыл бұрын
Would you ever consider doing a Dafny tutorial? I've have a very short introduction to it in one of my uni classes and thought it was interesting, and I'm sure it would help some people!
@derekbanas4 жыл бұрын
I'll see what I can do. I have looked at it and it is very verbose indeed
@cl324 жыл бұрын
@@derekbanas Thanks! I really appreciate your work :)
@alexandern86714 жыл бұрын
Thanks for another great video. It's probably me but I could not find the link to jupiter notebook you used in the video to run the examples. Could you please point me in the right direction if it is possible?
@derekbanas4 жыл бұрын
Thank you :) I show how to install everything for Windows here : kzbin.info/www/bejne/l2i8nZWkZs6efJI and for Mac here which is basically the same for Linux kzbin.info/www/bejne/aHvIoIGieMh_ha8 and at the end of my Pandas tutorial I talk about setting up virtual environments and installing libraries kzbin.info/www/bejne/hpTZpIKXnt2Inpo Sorry everything is all over the place. That is sort of the problem with trying to create a big course, while also making these learn in one videos.
@alexandern86714 жыл бұрын
@@derekbanas Thanks Derek for getting back to me. The video that you mentioned has a link to the Python codes that you used for the stats tutorial, but no codes for Matplotlib video that I am after. I found these on your web site www. newthinktank. com/2020/08/learn-matplotlib-one-video/ (remove spaces) where there was a link to your Github. Thanks again
@motiongraphic51453 жыл бұрын
What is the benefit of np.arrange i did not get it.😭
@elliem95484 жыл бұрын
Hey, thanks for the video, it's so well explained. For the Time Series section, I downloaded data from 21 Aug 2019 - 21 Aug 2020. I've done all the same code but when I put in plt.plot (date_arr_np, goog_cp) I get an error and this message: 'x and y must have same first dimension, but have shapes (64,) and (253,)'. Do you know what's gone wrong or how I can fix this?
@derekbanas4 жыл бұрын
Thank you :) It is hard to say. I have all the code and the csv file here github.com/derekbanas/matplotlib Try it and make sure you don't get an error
@jaroslavkrbec5822 жыл бұрын
@@derekbanas Same problem here, I managed to fix this example with your data, but in case of data I downloaded, it didn't work. Did you swith some other options on yahoo or something else? Anyway, thank you for your great work!
@jaroslavkrbec5822 жыл бұрын
So I figured it out! Almost kids' joy here :) My solution was to extract the same amount of rows from downloaded material a then use it. It may not be the most elegant sulution, but it worked. goog_data = pd.read_csv('GOOG.csv') goog_data goog_data_np = goog_data.to_numpy() goog_cp = goog_data_np[:, 4] data = pd.DataFrame(goog_cp) rows = data.head(43).to_numpy() #odstranit svátky holidays = [datetime.datetime(2022, 11, 17), datetime.datetime(2022, 10, 28)] date_arr = pd.bdate_range(start='10/1/2022', end='12/4/22', freq='C', holidays=holidays) date_arr_np = date_arr.to_numpy() fig_7 = plt.figure(figsize=(8,5)) axes_7 = fig_7.add_axes([0.1, 0.1, 0.9, 0.9]) plt.plot(date_arr_np, rows)
@cutieFAIZANHASSAN3 жыл бұрын
How did he put superscript (square) in string? Please somebody tell me.
@amirnajafi2064 жыл бұрын
Please do the Digital humanities introduction video(s).
@derekbanas4 жыл бұрын
I'll look into it. Thank you for the request
@EcExplorer4 жыл бұрын
It would be great if you take some time and explain the installation procedure and troubleshooting at the beginning. I am using pip install, matplotlib is installed but it is showing error in import.
@derekbanas4 жыл бұрын
In the description I have installation videos for Windows and MacOS. What error are you seeing?
@hosenmdaltaf4 жыл бұрын
Can you give the serial, where to start this series from pandas/numpy/statistics. That will be very helpful for me.
@derekbanas4 жыл бұрын
Here is my Data Science & Machine Learning Playlist in order kzbin.info/aero/PLGLfVvz_LVvQy4mkmEvtFwZGg1S38MUmn
@didierleprince61064 жыл бұрын
A ton of mercis
@derekbanas4 жыл бұрын
je suis très heureux d'aider
@liamhoward22084 жыл бұрын
How did you produce the superscript while typing x/x^2 for the legend?
@derekbanas4 жыл бұрын
Look for the TeX part of this tutorial
@robertovilchis60684 жыл бұрын
Hello Derek! I have a question, in the timeseries plot, when you create it you call plt.plot() instead of axes_6.plot(). Is there a difference between the two? Thanks!
@derekbanas4 жыл бұрын
Hi Roberto, You could also use axes_7.plot(date_arr_np, goog_cp) I did it that way just to show that it works either way
@robertovilchis60684 жыл бұрын
@@derekbanas Oh I see. Thanks! Great tutorial
@arpitagec94 жыл бұрын
Can you please cover a series on PyQt5 with Designer (Qt)?
@derekbanas4 жыл бұрын
I'll see what I can do
@arpitagec94 жыл бұрын
@@derekbanas Hope to see a detailed series!🤞
@theentertainmentworld3310 Жыл бұрын
Can you please provide that jupyter notebook file
@emifo60184 жыл бұрын
How did you I will come to your page to find machine learning tutorials these days to upload these?! Thanks, I have never come back from your channel with absence.
@derekbanas4 жыл бұрын
Thank you 😁 I hope you find them useful
@sudarshankshirsagar45684 жыл бұрын
I have favour to ask you bro , Will Go deep into Descriptive Analytics along with Supervised Machine Learning? I don't get anything which My Teacher teaches and they don't put much effort in teaching us(that's sorry to say but it's true). And one thing I really like your "Machine Learning and Data Science " series and I know that there are more things to come in that series . So best of luck and i really hope that you will go as deeper as possible in this series .Best wishes with you Bro . Keep it up 👍👍💪
@derekbanas4 жыл бұрын
Thank you for the nice message :) Yes I have promised I will dedicate myself to data science, machine learning and the related maths for the rest of the year. My goal to to provide a complete learning path all at one location in order.
@sadeghsadeghy65634 жыл бұрын
@Derek Banas hey derek ive watched your java tutorial and i wanna be java backend programmer what should i learn after that i mean what concept should i learn first on java ee and actually u promise me to create Spring tutorial ?
@derekbanas4 жыл бұрын
Basically everything listed in the certification is required education.oracle.com/oracle-certified-professional-java-ee-7-application-developer/trackp_900
@sadeghsadeghy65634 жыл бұрын
@@derekbanas i saw that but its little a bit counfusing u know could u cover it next tutorial i know u already created a java ee but its not enough i gues can u cover java ee i really need this and o already asked u to cover Spring too if u cover these topics your gonna change my life Thanks bro
@huizhao35894 жыл бұрын
where is the x, y_axis when saving the figure to a file?
@derekbanas4 жыл бұрын
Increase the figure size and both will show in the file
@patricknelson79144 жыл бұрын
Thanks man!
@derekbanas4 жыл бұрын
Happy to be of help :)
@taricov46623 жыл бұрын
thanx Derek
@derekbanas3 жыл бұрын
Thank you very much :) Happy I could help
@sarmadali33384 жыл бұрын
Hi Derek sir do you know any online compiler for machine learning if you Know then tell me
@derekbanas4 жыл бұрын
Sorry, but machine learning requires a pretty powerful computer. I used to use AWS which is pretty cheap up to a point.
@sarmadali33384 жыл бұрын
@@derekbanas ok thanks
@nguyenchucao82644 ай бұрын
22:00
@ThirumaleshHS14 жыл бұрын
Nice tutorial, next video on PyQtGraph please ?
@derekbanas4 жыл бұрын
I'll see what I can do. Seaborn is next because I'm already working on it. I have to schedule out way in advance to make videos every day.
@ThirumaleshHS14 жыл бұрын
Derek Banas thanks. Looking forward for the next videos. I found PyQtGraph visualisation to be faster than matplotlib especially for real time data/signals and at the same time, PyQtGraph is difficult to understand(for me :P)
@derekbanas4 жыл бұрын
I'll definitely check it out 😁 Thank you for the request