This is just a variation of the previours bar plot with pattern fill. Nothing particularly new here.
## gender gap explained in housework
mat<-matrix(c(16.7, 25.7,11.2,15.1), nrow=4, ncol=1, byrow=F)
rownames(mat) <- c("Relative Resources", "Time Availabity", "Autonomy", "Employment Status")
colnames(mat) <- c("Resource-based frameworks")
barplot(mat, beside=TRUE, ylim=c(-1,40), col=1, lwd=1:2, angle=c(45,0,45,0), density=seq(10,30,15))
barplot(mat, add=TRUE, ylim=c(-1,40), ylab="Percent of the Gender Gap Explained", main = "Percent of The Gender Gap Explained", beside=TRUE, col=1, lwd=1:2, angle=c(45, 0, 135, 90), density=seq(10,30,15))
mtext("Time Spent on Housework, USA", side=3)
for(i in 1:length(as.vector(mat))){
text(i+0.5, as.vector(mat)[i]+0.2, pos=3, cex=1, labels=as.vector(mat)[i])
text(i+0.5, -0.2, pos=1, cex=1, labels=rownames(mat)[i])
}
## gender gap explained in paid work
mat<-matrix(c(16.7, 25.7,11.2,15.1,
12.6, 12.2,8.1,11.2,
14.5,19.6,8.8, 13,
16.8,46.4,12.9,16.1,
-6.7,-17.4,-7.4,-7.8), nrow=4, ncol=5, byrow=F)
rownames(mat) <- c("Relative Resources", "Time Availabity", "Autonomy", "Employment Status")
colnames(mat) <- c("All Housework", "Cooking", "Cleaning", "Shopping", "Maintenance")
barplot(mat, beside=TRUE, ylim=c(-20,55), col=1, lwd=1:2, angle=c(45,0,45,0), density=seq(10,30,15))
barplot(mat, add=TRUE, ylim=c(-20,55), ylab="Percent of the Gender Gap Explained", main = "Percent of The Gender Gap Explained", beside=TRUE, col=1, lwd=1:2, angle=c(45, 0, 135, 90), density=seq(10,30,15))
for(i in 1:length(as.vector(mat))){
if(i<5){
text(i+0.5, as.vector(mat)[i]+0.2, pos=3, cex=0.8, labels=as.vector(mat)[i])
} else if (i>=5 & i<9){
text(i+1.5, as.vector(mat)[i]+0.2, pos=3, cex=0.8, labels=as.vector(mat)[i])
} else if (i>=9 & i<13){
text(i+2.5, as.vector(mat)[i]+0.2, pos=3, cex=0.8, labels=as.vector(mat)[i])
} else if (i>=13 & i<17){
text(i+3.5, as.vector(mat)[i]+0.2, pos=3, cex=0.8, labels=as.vector(mat)[i])
} else {
text(i+4.5, as.vector(mat)[i]-5, pos=3, cex=0.8, labels=as.vector(mat)[i])
}
}
par(xpd=TRUE)
legend(0, -30, legend=rownames(mat), text.width=c(0,6.4,5.8,5),
ncol=4, fill=TRUE, cex = 1, bty='n',
col=1, angle=c(45,0,45,0), density=seq(10,30,15))
legend(0, -30, legend=rownames(mat), text.width=c(0,6.4,5.8,5),
ncol=4, fill=TRUE, cex = 1, bty='n',
col=1, angle=c(45, 0, 135, 90), density=seq(10,30,15))
This plot is created by Kamila Kolpashnikova | Камила Колпашникова 2018