Matplotlib Tutorial 3 bar charts and histograms

Channel:
Subscribers:
1,410,000
Published on ● Video Link: https://www.youtube.com/watch?v=ZyTO4SwhSeE



Duration: 11:20
256,498 views
2,728


The plt.bar creates the bar chart for us. If you do not explicitly choose a color, then, despite doing multiple plots, all bars will look the same. This gives us a change to cover a new Matplotlib customization option, however. You can use color to color just about any kind of plot, using colors like g for green, b for blue, r for red, and so on. You can also use hex color codes, like #191970

Next, we can cover histograms. Very much like a bar chart, histograms tend to show distribution by grouping segments together. Examples of this might be age groups, or scores on a test. Rather than showing every single age a group might be, maybe you just show people from 20-25, 25-30... and so on.

sample code: http://pythonprogramming.net
http://hkinsley.com
https://twitter.com/sentdex
http://sentdex.com
http://seaofbtc.com




Other Videos By sentdex


2015-07-11Matplotlib Tutorial 13 - spines and horizontal lines
2015-07-11Matplotlib Tutorial 12 - more customization of colors and fills
2015-07-11Matplotlib Tutorial 11 - handling unix time
2015-07-11Matplotlib Tutorial 10 - basic customizations, rotating labels
2015-07-11Matplotlib Tutorial 9 - converting data from the internet
2015-07-11Matplotlib Tutorial 8 - getting data from the internet
2015-07-11Matplotlib Tutorial 7 - loading data from files
2015-07-11Matplotlib Tutorial 6 - Pie Charts
2015-07-11Matplotlib Tutorial 5 - stack plots
2015-07-11Matplotlib Tutorial 4 - Scatter Plots
2015-07-11Matplotlib Tutorial 3 bar charts and histograms
2015-07-11Matplotlib Tutorial 2 - Legends titles and labels
2015-07-11Matplotlib Tutorial 1 - Introduction and Line
2015-07-10[See Description] Understanding Hedgefund and other financial Objectives - Python for Finance 13
2015-07-10[See Description] Building Machine Learning Framework - Python for Finance 14
2015-07-08[See Description] Paper Trading a Strategy on Quantopian - Python for Finance 12
2015-07-06[See Description] Shorting based on Sentiment Analysis signals - Python for Finance 11
2015-07-05[See Description] Trading Logic with Sentiment Analysis Signals - Python for Finance 10
2015-07-04[See Description] Quantopian Fetcher - Python for Finance with Zipline and Quantopian 9
2015-07-03[See Description] Achieving Targets and Shorting - Python for Finance with Zipline and Quantopian 8
2015-07-02[See Description] Stop-Loss in strategy - Python for Finance with Quantopian and Zipline 7



Tags:
Bar Chart (Invention)
Chart
Histogram
Matplotlib (Software)
Python (Programming Language)