Data Visualization
Data Visualization
Fields:
Sales and marketing.
Politics.
Healthcare
Scientists
Finance
Examples:
sales analysis, market research analysis, customer analysis, defect analysis,
cost analysis, and Weather forecasting
DATA VISUALIZATION
data visualization libraries in Python:
Matplotlib
Matplotlib is a Python plotting library that allows you to construct
static, dynamic, and interactive visualizations
Matplotlib is a python library which provides many interfaces and
function to present data in 2D graphics.
Matplotlib library offers many different collections of sub modules
Pyplot is one such sub module.
Pyplot is a collection of methods within Matplotlib library which
allows user to construct 2D plots easily.
Other libraries
Seaborn , Ggplot, Bokeh ,pygal etc
DATA VISUALIZATION
To specify the position of the legend on the chart Loc parameter can be change
DATA VISUALIZATION
Matplotlib.pyplot.title() function can be used to display the title of the chart
Matplotlib.pyplot.savefig() function can be used to save the chart in jpeg or pdf format after plotting data
DATA VISUALIZATION
matplotlib.pyplot.xticks() and yticks() Function: by default pylpot will automatically decide which
data points will have ticks on the x axis or y axis but you can also decide which data points will
have the tick marks on X and Y axis.
DATA VISUALIZATION
matplotlib.pyplot.xlim() and ylim() Function: using this function you can specify the ranges for X
and Y
Note axisthe data values mapping on xlimits and ylimits will get plotted . If no data value maps to the
: only
xlimits and ylimits nothing will print
DATA VISUALIZATION
A bar chart or bar graph is a chart or graph that presents categorical data with rectangular bars with
heights or lengths proportional to the values that they represent
Python provides the bar() function to create bar chart
DATA VISUALIZATION
Multiple bar charts :
DATA VISUALIZATION
Customizing bar charts : Change color, width of charts
All bars with same width
DATA VISUALIZATION
Customizing bar charts : All bars with different width : A list of width can be
passed
DATA VISUALIZATION
Customizing bar charts : Change the color of bar