s

Plot types

By Angela C

March 3, 2021 in matplotlib seaborn altair plotly

Reading time: 2 minutes.

Just some notes on the various types of plots etc.

Statistical plots

Statistical plots are used for basic descriptive statistics and data analysis of a dataset.

  • Bar Graph:

    • used to display numerical quantities on one axis and categorical variables on the other axis.
    • shows the number of occurences for the different categories.
  • Pie Chart:

    • breaks down a whole sample of data points into different categories with each category represented as a percentage of the whole.
    • the sections must add up to 100%
    • used for showing proportional data.
  • Histogram:

    • shows the distribution and shape of continuous data.
    • uses bars where each bar groups numbers into ranges
    • for quantitative data, not categorical data
  • Scatterplot:

    • shows the relationship between two quantitative continuous variables in a dataset.
    • Each dot represents a sample point where the x-values and y-values interact
  • Boxplots:

    • shows how continuous quantitative data is distributed

    • shows central tendency, symmetry, skew of the data and any outliers.

    • also known as box and whisker plots.

    • the median is clearly shown by a a line through the box

    • the box shows the the 1st and 3rd quartiles of the distribution

    • the whiskers show the entire range of the distribution between the minimum and maximum values, excluding the outliers

    • outliers are shown on the plot as points outside the whiskers

    • the interquartile values

  • Violin plots:

    • modified box-plots
    • shows the distribution as well as the probability density of the data
    • a dot in the middle shows the median value
    • also shows the distribution of the upper quartile range
    • the width of the distribution shows the probability of getting different values when sampling.
  • Networks and Graphs:

    • a Graph is a data structure consisting of nodes and edges which store data points as well as the relationships between them.
    • used for data with structure relationships where certain data points / nodes having links to other nodes.
    • used for visualising relationships in social networks or for any data that has relationships.
  • Geographical:

    • visualise the occurence of a variable across geographical regions
  • 3D plots:

    • used for exploring relationships between more than two variables.
    • contour plots
    • correlation plots
  • Interactive plots:

    • to visualise more complex relationships
    • zoom in and out
    • toggle different variables on and off
    • rotate