[R] A horizontal or vertical line draw on mosaic plot?

From: Sang Chul Choi <Choi_at_biology.rutgers.edu>
Date: Fri, 02 May 2008 13:04:52 -0400


I want to have a horizontal line on a mosaic plot with "vcd" package. This would give me an idea where is 0.5 proportion in a cell. Using
"mosaicplot" function of "graphics" package, I can draw a line using
"abline." But, with "mosaic" function of "vcd" package, I have tried
to use "abline" function, which complains "plot.new has not been called yet".

Is there a way to draw lines across a mosaic plot?

music = c(210, 194, 170, 110,

            190, 406, 730, 290)
dim(music) = c(2, 4)
dimnames(music) = list(Age = c("Old", "Young"),

                         Education = c("High", "Low", "Upper", "Lower"))
mosaic(music, keep_aspect_ratio=FALSE)
Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) :

   plot.new has not been called yet

Thank you,

Sang Chul

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 02 May 2008 - 18:06:46 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 02 May 2008 - 19:30:33 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive