You are on page 1of 8

A Review of Data Visualization

Methods in Python
USHA MAJARI SIKHARAM

ABSTRACT

Data visualization involves presenting data in graphical or pictorial


form which makes the information easy to understand. It helps to
explain facts and determine courses of action. It will benefit any
field of study that requires innovative ways of presenting large,
complex information. The advent of computer graphics has
shaped modern visualization. This paper presents a Python Data
Visualization Libraries.

Keywords: Data visualization, Information Visualization, Scientific


Visualization, Big data.
1. INTROD key relationships in visualization. They large and
UCTION plots and charts are: complex data
that are more becomes easy.
Data visualization visceral to yourself
I.2 Matplotli
is an important skill 1. Line Plot
and Stakeholders b Advantages
in applied statistics 2. Bar Chart
than measures of
and machine 3. Histogram There are
association or
Plot several
learning. Statistics significance. We'll
4. Box and
advantages of
does indeed focus learn more about
using matplotlib
on quantitative Whisker Plot
how to visualize to visualize
descriptions and 5. Scatter Plot
data using the data.
estimations of data. Python
With knowledge of  A multi-
Data visualization programming
these plots, you can platform data
provides an language below. quickly get a visualization
important suite of qualitative tool built on
Python understanding of the numpy
tools for gaining a
offers multiple most data that you and sidepy
qualitative
great graphing
come across. framework.
understanding.
Therefore, it's
libraries that come I.1 Matplotli
This can be helpful fast and
packed with lots of b efficient.
when exploring
different features. Matplotlib is a  It possesses
and getting to
python two- the ability to
No matter if you
know a dataset and work well
want to create dimensional
can help with with many
plotting library
identifying
interactive, live or operating
for data systems and
highly customized
patterns, corrupt
visualization graphic back
plots python has an
data, outliers, and and creating ends.
excellent library for
much more. With a interactive
 It possesses
you. graphics or
little domain high-quality
knowledge, data plots. Using graphics and
There are five key
visualizations can python’s plots to print
plots that you need
matplotlib, the and view for a
be used to express to know well for
data range of
and demonstrate basic data graphs such
visualization of
as histograms, functions accessed and 1.3 Line Plot
bar charts, pie on pyplot. The configured on
A line plot is
charts, scatter context can be this context as
generally used
plots and heat separate
imported as to present
maps. function calls.
follows observations
 With Jupyter The drawings on collected at
notebook from matplotlib regular
the context can
integration, import pyplot be shown in a intervals.
the new window by
developers There is some The x-axis
calling
have been free convention to represents the
the show()
to spend their import this regular interval,
function:
time context and such as time.
implementing name it plt; for The y-axis
pyplot.show()
features example: shows the
rather than import observations,
struggling matplotlib.pyplo Alternately, the ordered by the
with t as plt drawings on the x-axis and
compatibility. connected by a
context can be
We will not use line. A line plot
 It has large saved to file,
this convention; can be created
community such as a PNG
instead we will by calling
support and formatted image
stick to the the plot()
cross-
standard Python file. function and
platform
import The savefig() passing the x-
support as it
convention. function can be axis data for the
is an open
source tool. used to save regular interval,
Charts and plots
images. and y-axis for
 It has full are made by
the observations.
control over making and
calling on pyplot.savefig('
graph or plot # create line plot
context; for my_image.png')
styles such as pyplot.plot(x, y)
line example:
This is the most
properties,
pyplot.plot(...) basic crash
thoughts, and Line plots are
course for using
access useful for
Elements such the matplotlib
properties. presenting time
as axis, labels, library. series data as
The context can legends, and so
well as any
be accessed via on can be
sequence data Running the each category integer value is
where there is example creates and is drawn as drawn for the
an ordering a line plot a bar from the quantity in each
between showing the baseline to the category.
observations.
familiar sine appropriate
# example of a
The example wave pattern on level on the y-
below creates a the y-axis across axis. bar chart
sequence of 100 the x-axis with a from random
A bar chart can
floating point consistent
values as the x- be created by import seed
interval between
axis and a sine calling the bar() from random
observations.
wave as a function and
import randint
function of the passing the
x-axis as the category names from matplotlib
observations on for the x-axis import pyplot
the y-axis. The
and the
results are # seed the
quantities for
plotted as a line
the y-axis. random number
plot.
1.4 Bar Chart generator
# create bar
# example of a
A bar chart is chart seed(1)
line plot
generally used pyplot.bar(x, y)
from numpy # names for
import sin to present
categories
from matplotlib relative Bar charts can be
import pyplot quantities for useful for x = ['red', 'green',
# consistent multiple comparing 'blue']
interval for x- categories. multiple point
axis quantities or # quantities for
x = [x*0.1 for x in The x-axis estimations. each category
range(100)] represents the
# function of x The example y = [randint(0,
categories and
for y-axis are spaced below creates a 100), randint(0,
y = sin(x) dataset with
evenly. 100), randint(0,
# create line plot three categories,
pyplot.plot(x, y) The y-axis each defined 100)]
# show line plot represents the with a string
pyplot.show() quantity for label. A
single random
# create bar For example function and seed(1)
observations passing in a list # random
chart or array that
with values numbers drawn
pyplot.bar(x, y) between 1 and represents the from a Gaussian
10 may be split data sample. distribution
# show line plot
into five bins, x = randn(1000)
pyplot.show() the values [1,2] # create # create
would be histogram plot histogram plot
Running the pyplot.hist(x) pyplot.hist(x)
allocated to the
example creates # show line plot
first bin, [3,4] Histograms are
the bar chart pyplot.show()
would be valuable for
showing the
allocated to the summarizing
category labels Running the
second bin, and the distribution
on the x-axis example, we can
so on. of data samples.
and the see that the
quantities on the shape of the bars
The y-axis The example
y-axis. shows the bell-
represents the below creates a
frequency or dataset of 1,000 shaped curve of
count of the random the Gaussian
number of numbers drawn distribution. We
observations in from a standard can see that the
the dataset that Gaussian function
distribution, automatically
belong to each
then plots the chose the
Example of a Bar bin.
Chart dataset as a number of bins,
1.5 Histogram Essentially, a histogram. in this case
Plot data sample is splitting the
transformed into # example of a values into
A histogram groups by
a bar chart histogram plot
plot is generally integer value.
where each from
used to
category on the numpy.random
summarize the
x-axis represents import seed
distribution of a
an interval of from
data sample. numpy.random
observation
values. import randn
The x-axis
from matplotlib
represents
A histogram import pyplot
discrete bins or
plot can be # seed the
intervals for the
created by random number
observations.
calling the hist() generator
summarize the sample as an data sample
middle 50% of array or list. drawn from a
the dataset slightly different
starting at the # create box and Gaussian
whisker plot
observation at distribution. Each
pyplot.boxplot(x)
the 25th data sample is
percentile and created as an
Boxplots are
ending at the array and all
useful to
75th percentile. three data sample
summarize the
This is called arrays are added
distribution of a
the interquartile to a list that is
data sample as an
Example of a range, or IQR. padded to the
Histogram Plot alternative to the
The median, or plotting function.
histogram. They
50th percentile, is
1.6 Box and can help to
drawn with a
Whisker quickly get an # example of a
line.
Plot idea of the range
Lines called box and whisker
of common and
A box and whiskers are
sensible values in plot
whisker plot, or drawn extending
the box and in the from
box plot for from both ends
whisker
short, is of the box numpy.random
respectively.
generally used to calculated as (1.5
Because we are import seed
summarize the x IQR) to
not looking at the from
distribution of a demonstrate the
shape of the
data sample. expected range numpy.random
distribution
of sensible values
explicitly, this import randn
The x-axis is in the
method is often
used to represent distribution. from matplotlib
used when the
the data sample, Observations import pyplot
data has an
where multiple outside the
unknown or # seed the
box plots can be whiskers might
unusual
drawn side by be outliers and random number
distribution, such
side on the x-axis are drawn with
as non-Gaussian. generator
if desired. small circles.
seed(1)
The example
The y-axis Box plots can be # random
below creates
represents the drawn by calling
the boxplot() three boxplots in numbers drawn
observation
function passing one chart, each
values. A box is
in the data summarizing a
drawn to
from a Gaussian range of sensible observation relationship
data, and finally values for the first clearer.
distribution
dots for the sample, and the
x = [randn(1000), possible outliers. y-axis represents A dataset may
5 * randn(1000), the observation have more than
values for the two measures
10 * randn(1000)]
second sample. (variables or
# create box and Each point on the columns) for a
plot represents a given
whisker plot
single observation. A
pyplot.boxplot(x) scatter plot matrix
observation.
# show line plot is a cart
Scatter plots can containing scatter
pyplot.show()
be created by plots for each pair
Example of a calling of variables in a
Box and Whisker Plot the scatter()
dataset with more
function and
Running the than two
1.6 Scatter Plot passing the two
example creates a data sample variables.
A scatter plot (or
chart showing the arrays.
‘scatterplot’) is The example
three box and
generally used to # create scatter below creates two
whisker plots. We
summarize the plot data samples that
can see that the
relationship pyplot.scatter(x, are related. The
same scale is used
between two y) first is a sample of
on the y-axis for
paired data random numbers
each, making the
samples. Scatter plots are drawn from a
first plot look
useful for standard
squashed and the
Paired data showing the Gaussian. The
last plot look
samples means association or second is
spread out.
that two correlation dependent upon
measures were between two the first by
In this case, we
recorded for a variables. A adding a second
can see the black
given correlation can be random Gaussian
box for the
observation, such quantified, such value to the value
middle 50% of the
as the weight and as a line of best of the first
data, the orange
height of a fit, that too can be measure.
line for the
person. drawn as a line
median, the lines
plot on the same # example of a
for the whiskers
The x-axis
summarizing the chart, making the scatter plot
represents
from between the two allowed data
variables. visualization to be
numpy.random useful in many
import seed fields of study.

from REFERENCES:
numpy.random

import randn

from matplotlib

import pyplot
Example of a
# seed the Scatter Plot
random number

generator CONCLUSION
seed(1)
Data visualization
# first variable is the process of
x = 20 * representing data
in a graphical or
randn(1000) + 100 pictorial way in a
# second variable clear and effective
manner. It has
y = x + (10 * emerged as a
randn(1000) + 50) powerful and
widely applicable
# create scatter tool for analyzing
plot and interpreting
large and
pyplot.scatter(x, complex data. It
y) has become a
quick, easy means
# show line plot of conveying
pyplot.show() concepts in a
universal format.
Running the It must
example creates communicate
the scatter plot, complex ideas
showing the with clarity,
positive accuracy, and
relationship efficiency. These
benefits have

You might also like