天道酬勤,学无止境

mosaic-plot

Mosaic Plot Help in R

My current plot: My desired plot (nevermind the variables s) Specifically: explanatory variables on the bottom with an x-axis, response variables on the right, relative frequency and the y-axis on the left. I'll attach my R code below. mosaictable <- matrix (c (3, 9, 22, 21), byrow = T, ncol = 2) rownames (mosaictable) = c ("White", "Blue ") colnames (mosaictable) = c ("Captured", "Not Captured") mosaicplot ((mosaictable), sub = "Pigeon Color", ylab = "Relative frequency", col = c ("firebrick", "goldenrod1"), font = 2, main = "Mosaic Plot of Pigeon Color and Their Capture Rate" ) axis (1) axis

2021-05-12 20:19:15    分类:问答    r   mosaic-plot