Skip to main content
100%

Visualization Implementation 5 (VI 5)

✓ Published0🌍 Public
MMrajyalakshmi
Last edited Feb 24, 2016
Created on Feb 24, 2016

This example demonstrates the "get it right in black and white" rule of thumb using paired donut charts of mobile sales data for five companies. It first presents a color-coded chart where each company remains distinguishable when converted to grayscale, then shows a second chart with different colors that become indistinguishable in black-and-white. The visualizations are generated with R's `googleVis` package, specifically `gvisPieChart`, which creates interactive pie charts with a configurable `pieHole` for the donut effect, along with explicit color and slice offset options.

AI-generated description

Rajyalakshmi Mukkamala

Rule of Thumb

#####Get it right in black and white Visual representation is legible even if the image is tranformed from full color to black and white.

######Visualization that demostrates the rule

Used R for creating the Visualizations

Donut chart

R image

Embedding R code


dat <- data.frame(company=c("Apple", "Samsung", "HTC", "Xiaomi", "Sony"), 
number.of.units=c(1930, 1830, 1440, 1467, 760)) library(googleVis) 
## Doughnut chart - a pie with a hole 
doughnut <- gvisPieChart(dat,
options=list( width=500, height=500, 
slices="{0: {offset: 0.2}, 1: {offset: 0.2}, 2: {offset: 0.2}}", 
title='Mobile Sales 2016 Janaury ', 
legend='', 
colors="['green','blue', 'lightblue', 'orange', 'yellow']",
pieHole=0.5), chartid="doughnut") 
plot(doughnut)

Image converted to Black and White

![R image] (http://i65.tinypic.com/ebdgs2.jpg)

This visualization in black and white does not loose any information.Companies can be identified with black and white color saturation.The conversion image to black and white does not obscure any information from the visualization.

######Visualization that violates the rule

![R image] (http://i64.tinypic.com/2ueodx2.jpg)

Embedding R code


dat <- data.frame(company=c("Apple", "Samsung", "HTC", "Xiaomi", "Sony"), 
number.of.units=c(1930, 1830, 1440, 1467, 760)) 
library(googleVis) 
## Doughnut chart - a pie with a hole 
doughnut <- gvisPieChart(dat, 
options=list( width=500, height=500,
slices="{0: {offset: 0.2}, 1: {offset: 0.2}, 2: {offset: 0.2}}", 
title='Mobile Sales 2016 Janaury ', 
legend='', 
colors="['darkgreen','brown', 'magenta', 'green', 'red']", pieHole=0.5), 
chartid="doughnut") 
plot(doughnut)

Image converted to Black and White

R image

This visualization in black and white cannot differentiate companies through colors. This visualization doesnot preserve the information. It violates the thumb rule "Get it right in black and white".

Similar vizzes