Skip to content

personograph

A personograph is a pictographic representation of proportions. Below is an example personograph to visualize proportions of female and male students.

### Not to run ###

library(personograph)

# produce a contingency table
final <- readRDS('data/names_annotated.rds')
p.student <- with(final[final$position=='student',], prop.table(table(gender)))
p.student
gender
  female     male 
0.539749 0.460251 
### Not to run ###

# visualize gender distribution per position
png('results/gender_students.png', res=300, height=2000, width=2000)
personograph(p.student, icon.style=9, n.icons=sum(final$position=='student'),
             colors=list(male='#2b8cbe',female='#f768a1'), draw.legend=T)
dev.off()