Do you want to learn technology from me? Check codebasics.io/ for my affordable video courses
@rancher162 жыл бұрын
Unable to get matplotlib pyplot documentation
@tauhidanwar35124 жыл бұрын
i also changed the width in barh same like in vertical bar. It's little bit different to do in barh. The width in barh is actually height. So to change the width in barh, we have to change the value of height= 0.4 This one thing i learned out from this video with my own research from internet. Thanks sir for the amazing tutorials over the data science.
@armagaan0076 жыл бұрын
Amazon is a weird company 😂😂 Love your videos They are neither too long nor too short and deliver everything at a good pace. Thanks a lot (You are great at explaining)
@muvvalavenkataaravindasatv21313 жыл бұрын
To avoid overlapping while plotting the bar graph horizontally, use height=0.4
@afeezyusuf84692 жыл бұрын
Thanks very helpful
@mailrafat4 жыл бұрын
the most helpful bar vid for matplotlib
@codebasics4 жыл бұрын
Thanks rafat.
@astridhaugland6 жыл бұрын
Excellent tutorial!
@subratkumarsahoo48496 жыл бұрын
we can directly plot the bar chart with company and revenue plt.bar(company,revenue) it works.
@debashissahoo50316 жыл бұрын
Can we put side by side bar chart by this way? If we try the below steps, it's only coming a stacked bar chart. plt.bar(company,revenue, label='Revenue') plt.bar(company,profit, label='Profit')
@debashissahoo50316 жыл бұрын
thank you sir @codebasics
@deojeetsarkar20065 жыл бұрын
No my friend no sks, int,str problem arises all the time.
@harshavardhanreddy70635 жыл бұрын
@@deojeetsarkar2006 It worked for me
@jumpropemonk77034 жыл бұрын
It worked for me too and I managed to avoid the importing np
@ILiveOnTheSun4 жыл бұрын
Thank you so much for making such great videos on matplotlib. It was really really really helpful.😃
@codebasics4 жыл бұрын
👍😊
@claudiagomes11043 жыл бұрын
thank you so so so soooooo much, you saved my life
@vedantdivanji27695 жыл бұрын
Ur videos are amazing. Love the way you teach concepts. I would be happy if you could make a tutorial on Seaborn too.
@codebasics5 жыл бұрын
Sure vedant. I will note down this topic and get to it in future
@karanpadda3 жыл бұрын
@@codebasics Why do we use figure and Axis? , do you have video ?
@HashWithHarish Жыл бұрын
Can someone help me to understand why did sir remove width @ 7:37
@rifqimatondang4 жыл бұрын
Thank you very much! this helped my college assignment :D
@codebasics4 жыл бұрын
Glad it helped!
@abarth08005 жыл бұрын
Good work, straight to the points!
@codebasics5 жыл бұрын
Thanks for the appreciation David.
@ankitkumarsingh37176 жыл бұрын
why do we need xticks function if we can directly pass company string as an argument in bar function. great tutorial though!
@TusharSinghmetal4 жыл бұрын
It makes sure that you stick to the current axis. If you didn't get it do check this link(www.tutorialspoint.com/matplotlib/matplotlib_setting_ticks_and_tick_labels.htm) This might help you!
@reginakuai73074 жыл бұрын
@@TusharSinghmetal .aimlessly
@TusharSinghmetal4 жыл бұрын
@@reginakuai7307 if u have better idea please share it
@ProfitScalpKing17 жыл бұрын
Great Video!
@okamibeats77163 жыл бұрын
how do i change the bar color for every company? as i want to do this with my own data like that
@vedanthbaliga76864 жыл бұрын
It is such a tedious task to create histograms and bar plots in Matplotlib! I would prefer Seaborn any day over Matplotlib🙂
@harshalbhoir89862 жыл бұрын
Thank you so much!!!
@HashWithHarish Жыл бұрын
Can you help me to understand why did sir remove width @ 7:37
@AKSHAY995523 жыл бұрын
worked for horizontal side by side bars plt.barh(xpos-0.2,revenue,height=0.4,label='Revenue') plt.barh(xpos+0.2,profit,height=0.4,label='Profit')
@km-ss7st6 жыл бұрын
thank you very much teacher!
@flamboyantperson59366 жыл бұрын
Great one
@MissTexZilla5 жыл бұрын
Thank you for explaining xticks
@codebasics5 жыл бұрын
My pleasure Kris. Thanks for the comment 😊
@vinayaksharma-ys3ip3 жыл бұрын
Thank You Sir so much!!
@Sumit_S5 жыл бұрын
Hi i have a question , suppose on x axis we have labels that are too long and they are appending on each other and are not visible properly , so how can we provide space between the xlabels
@KK-pf1ye2 жыл бұрын
Thank you!
@ashleypursell97024 жыл бұрын
awesome video thanks so much
@codebasics4 жыл бұрын
Glad you liked it!
@sanjaykrish87197 жыл бұрын
Very good video.. Thanks
@eashansoni37616 жыл бұрын
Good tutorial. To answer your question about why Amazon's profits are so low, it's because Amazon cares much more about the long-term than the short-term. So they will buy a lot of companies and invest in lots of new technologies which decrease their profits, but they expect these purchases and investments to pay off later on. Also, Amazon is one of the few companies that care more about advancing civilization rather than simply making a profit, and Amazon's profits are simply a means to that goal. Hope that answered your question.
@ASNPersonal4 жыл бұрын
Thank you for explaining xticks & side by side graphs. What is the importance of %matplotlib inline?
@balaji96293 жыл бұрын
To get graph next to the cell
@veda56194 жыл бұрын
Nice , thank you
@codebasics4 жыл бұрын
Welcome 😊
@tsukishima1234 жыл бұрын
if you take repeated values for example in company does the revenue get averaged or summed up
@juandavidlozadacalderon13564 жыл бұрын
Thanks friend.
@arban4514 жыл бұрын
Thank you sir for this thank you really
@soccerclub44174 жыл бұрын
The last example output: plt.yticks(xpos,company) plt.xlabel("Revenue(BN)") plt.title("US TECH STOCK") plt.barh(xpos-0.2,revenue,height=0.4,label="Revenue") plt.barh(xpos+0.2,profit,height=0.4,label="Profit") plt.legend()
@sadhnajain13744 жыл бұрын
Error is coming that name 'profit' is not defined when I write plt.bar(ypos,profit,label="Profit") but I've defined profit= [40,2,34,12] same as your code please help me with this
@itzikovadia8514 жыл бұрын
xticks is unnecessary and it is not working for me. instead as the guys suggestion i put plt.bar(company,revenuge) and it is working thanks a lot Sir
@faisalqureshi71453 жыл бұрын
How to Show a value on the bar in Matplotlib and seaborn?
@urvishshah5706 жыл бұрын
You have not define ypos.How the error not coming? Kindly check it
@codebasics6 жыл бұрын
In python you dont need to explicitly declare a variable before using it. So this code is correct, ypos = np.arange(len(company))
@nishushroff96563 жыл бұрын
How to get the sample project
@shaikhkashif99732 жыл бұрын
Bar plot is univariate, yes so why u are using as 2 variables inside it
@alakhpandey.shorts2 жыл бұрын
Your voice looks like one of the my classmates
@ranchhordaschaanchad26237 ай бұрын
great listening your text!
@sejalanand233 жыл бұрын
I figured out an easier way to do side-by-side charts. plt.subplots(figsize=(width,height)) # to change size of subplots plt.subplot(total no of rows, total no of columns, plot #) plt.bar(x,y) plt.tight_layout() for space between plots
@sandipghosh5714 Жыл бұрын
plt.bar(company, revenue) is working on my computer
@HashWithHarish Жыл бұрын
Can you help me to understand why did sir remove width @ 7:37
@sandipghosh5714 Жыл бұрын
@@HashWithHarishwell you can experiment with that, you can see by removing or by not removing, what are the end results, try it out, you will find it informative
@Yourxway Жыл бұрын
its working for me too, idk why no one is talking about it, maybe they updated this feature in some new version of matplotlib as this video is 4 years old
@heeramani74634 жыл бұрын
plz increase fontsize...
@codebasics4 жыл бұрын
point noted.
@vamsisaggurthi55286 жыл бұрын
Good
@yanyupan5 жыл бұрын
"I never understood Amazon" ,,,,,,,,hahaha
@codebasics5 жыл бұрын
Isn't that true , ha ha 😂
@CE-vd2px4 жыл бұрын
@@codebasics Theyre going for the monopoly and likely government sponsored
@shrutijain16284 жыл бұрын
💯💯
@jimmychangtiunnkunui7877 Жыл бұрын
"Amazon is a weird company.They don't generate any profit." lol
@shivagolla51524 жыл бұрын
I am getting an error while giving a label to axis plt.xlabel('Company') plt.ylabel('Revenue') Error: String object is not callable. Anyone with the same error? Did you get that right? please help me out!
@codebasics4 жыл бұрын
Look like just before .xlabel call plt seems to have string in it.
@MrPrudhvisai4 жыл бұрын
all this can be done in one shot using data frame i guess df.plot(kind='bar')
@deojeetsarkar20065 жыл бұрын
Ore gajaab, sentdex, corey jo ny bataya wo tum bataya.
@codebasics5 жыл бұрын
Wow thanks for your kind words of appreciation deojeet 😀👍
@jumpropemonk77034 жыл бұрын
Tableau and Power BI would have finish the same time in no time. Cool tutorial though
@yagamilul4479 Жыл бұрын
my indian guy
@spiralni3 жыл бұрын
why to use xticks? plt.bar(company, revenues) will do the trick
@HashWithHarish Жыл бұрын
Its because that if we use your approach then we can't separate revenue and profit bar from each other, so for doing that we need to use numpy approach and for that we have to use xticks
@siddharthjain83106 жыл бұрын
Content is good. But please correct your pronunciation of "legend"