ML Wiki
Machine Learning Wiki - A collection of ML concepts, algorithms, and resources.

Mosaic Plot

Mosaic Plot

This is a Plot

  • it’s a visualization of information from Contingency Tables
  • it’s similar to a Bar Chart, but shows more information
  • uses areas to represent this information

R

Add data

library(openintro)
data(email)

One variable

tab1 = table(email$number)
mosaicplot(tab1, col=c('yellow2', 'skyblue2', 'red'),
           main='Numbers in emails')

Image

tab2 = table(email$number, email$spam)
mosaicplot(tab2, col=c('yellow2', 'skyblue2'),
           main='Numbers in emails vs spam/not spam')

Image

Sources