vcd

R vcd::mosaic overlapping labels

一世执手 提交于 2019-12-08 02:06:03
问题 I'm generating a mosaic plot with vcd::mosaic . But the text of the factors I was given are very long (cutting them is not an option, and with so many instances, introducing \n seems daunting), so there's an overlap in the texts, and I haven't been able to force the labels to go perpendicular to the axis. This is what I'm trying: a <- data.frame(x=sample(LETTERS[1:4],16,replace = TRUE), y=rep(paste("very long label here at number", 1:4, paste=" "), 4)) mosaic(y ~ x, data= a, las= 2) but this

R vcd::mosaic overlapping labels

大憨熊 提交于 2019-12-06 07:25:10
I'm generating a mosaic plot with vcd::mosaic . But the text of the factors I was given are very long (cutting them is not an option, and with so many instances, introducing \n seems daunting), so there's an overlap in the texts, and I haven't been able to force the labels to go perpendicular to the axis. This is what I'm trying: a <- data.frame(x=sample(LETTERS[1:4],16,replace = TRUE), y=rep(paste("very long label here at number", 1:4, paste=" "), 4)) mosaic(y ~ x, data= a, las= 2) but this is what I get: I've also tryed par(las= 2) and par(las= 3) but none of those is able to force them into